[Title]fix preferences page for tools
authorhyunsik.noh <hyunsik.noh@samsung.com>
Thu, 20 Sep 2012 10:36:28 +0000 (19:36 +0900)
committerhyunsik.noh <hyunsik.noh@samsung.com>
Thu, 20 Sep 2012 10:36:28 +0000 (19:36 +0900)
[Type]enhancement
[Module]common
[Redmine#]

Change-Id: I79fb9d354c559b67f0ec54628094d777d5fdbaad

org.tizen.common.connection/OSGI-INF/l10n/bundle.properties
org.tizen.common.connection/plugin.xml
org.tizen.common.connection/src/org/tizen/common/connection/preference/PreferenceMessages.java
org.tizen.common.connection/src/org/tizen/common/connection/preference/PreferenceMessages.properties
org.tizen.common.connection/src/org/tizen/common/connection/preference/TizenConnectionExplorerPreferencePage.java
org.tizen.common.connection/src/org/tizen/common/connection/preference/TizenToolsPreferencePage.java [new file with mode: 0644]

index af68969..cc41b01 100644 (file)
@@ -8,6 +8,7 @@ view.log = Log
 properties.page.info = Info
 properties.page.permission = Permission
 
+tools.name = Tools
 connectionexplorer.name = Connection Explorer
 
 command.category = Connection Explorer
index f6b3038..a04b4f5 100644 (file)
    <extension
         point="org.eclipse.ui.preferencePages">
         <page
+            class="org.tizen.common.connection.preference.TizenToolsPreferencePage"
+            id="org.tizen.common.connection.preferences.tizentools"
+            name="%tools.name"
+            category="org.tizen.common.preferences.tizencommon">
+        </page>
+    </extension>
+    
+    <extension
+        point="org.eclipse.ui.preferencePages">
+        <page
             class="org.tizen.common.connection.preference.TizenConnectionExplorerPreferencePage"
-            id="org.tizen.common.connection.preferences.tizencommon"
+            id="org.tizen.common.connection.preferences.tizenconnectionexplorer"
             name="%connectionexplorer.name"
-            category="org.tizen.common.preferences.tizencommon">
+            category="org.tizen.common.connection.preferences.tizentools">
         </page>
     </extension>
 
index 92a3d9b..4fa6b06 100644 (file)
@@ -5,6 +5,7 @@
 *
 * Contact: 
 * Kangho Kim <kh5325.kim@samsung.com>
+* Hyunsik Noh <hyunsik.noh@samsung.com>
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -32,7 +33,7 @@ public class PreferenceMessages {
 
     public static String CONNECTION_EXPLORER_DESCRIPTION;
     public static String CONNECTION_EXPLORER_GROUP_TIMEOUT;
-    public static String CONNECTION_EXPLORER_TIMEOUT_DESCRIPTION;
+    public static String CONNECTION_EXPLORER_TIMEOUT_CAUTION;
     public static String CONNECTION_EXPLORER_LABEL_TIMEOUT;
     
     public static String CONNECTION_EXPLORER_GROUP_EMULATOR_MANAGER;
index 9a2d715..65661b0 100644 (file)
@@ -1,7 +1,8 @@
-CONNECTION_EXPLORER_DESCRIPTION=Settings for Connection Explorer
-CONNECTION_EXPLORER_GROUP_TIMEOUT=Setting Timeout
-CONNECTION_EXPLORER_TIMEOUT_DESCRIPTION=Set timeout to push/pull files through the Connection Explorer
-CONNECTION_EXPLORER_LABEL_TIMEOUT=Timeout (milliseconds, 0 means waiting forever) :
+CONNECTION_EXPLORER_DESCRIPTION=Settings for Connection Explorer :
+CONNECTION_EXPLORER_GROUP_TIMEOUT=Timeouts
+CONNECTION_EXPLORER_TIMEOUT_CAUTION='0' means waiting forever
+
+CONNECTION_EXPLORER_LABEL_TIMEOUT=Timeout to transfer files (in milliseconds):
 
 CONNECTION_EXPLORER_GROUP_EMULATOR_MANAGER=Emulator Manager Path
 CONNECTION_EXPLORER_LABEL_LOCATION=Location :
\ No newline at end of file
index 75a53df..20c99bb 100644 (file)
@@ -5,6 +5,7 @@
 *
 * Contact: 
 * Kangho Kim <kh5325.kim@samsung.com>
+* Hyunsik Noh <hyunsik.noh@samsung.com>
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -27,7 +28,6 @@ package org.tizen.common.connection.preference;
 
 import java.io.File;
 
-import org.eclipse.jface.preference.DirectoryFieldEditor;
 import org.eclipse.jface.preference.FieldEditorPreferencePage;
 import org.eclipse.jface.preference.FileFieldEditor;
 import org.eclipse.jface.preference.IntegerFieldEditor;
@@ -100,16 +100,21 @@ implements IWorkbenchPreferencePage
         Composite comp = createGroup( parent, PreferenceMessages.CONNECTION_EXPLORER_GROUP_EMULATOR_MANAGER, 1 );
         Composite formatComposite = createCompositeEx( comp, 1, GridData.FILL_HORIZONTAL);
         FileFieldEditor fileField = new FileFieldEditor(KEY_EMULATOR_MANAGER_PATH, PreferenceMessages.CONNECTION_EXPLORER_LABEL_LOCATION, formatComposite);
+        fileField.getTextControl(formatComposite).setEditable(false);
         addField(fileField);
     }
        
        private void createPushPullTimeoutPreferences( Composite parent ) {
         Composite comp = createGroup( parent, PreferenceMessages.CONNECTION_EXPLORER_GROUP_TIMEOUT, 1 );
-        Label desc = new Label(comp, SWT.NONE);
-        desc.setText(PreferenceMessages.CONNECTION_EXPLORER_TIMEOUT_DESCRIPTION);
-        Composite formatComposite = createCompositeEx( comp, 1, GridData.FILL_HORIZONTAL);
+        Composite formatComposite = createCompositeEx( comp, 2, GridData.FILL_HORIZONTAL);
         IntegerFieldEditor intField = new IntegerFieldEditor(KEY_PUSHPULL_TIMEOUT, PreferenceMessages.CONNECTION_EXPLORER_LABEL_TIMEOUT, formatComposite);
         intField.setValidRange(0, Integer.MAX_VALUE);
+        intField.getTextControl(formatComposite).setToolTipText(PreferenceMessages.CONNECTION_EXPLORER_TIMEOUT_CAUTION);
+        Label nullLabel = new Label(formatComposite, SWT.None);
+        nullLabel.setText("");
+        Label cautionLabel = new Label(formatComposite, SWT.None);
+        cautionLabel.setText(PreferenceMessages.CONNECTION_EXPLORER_TIMEOUT_CAUTION);
+
         addField(intField);
     }
     
diff --git a/org.tizen.common.connection/src/org/tizen/common/connection/preference/TizenToolsPreferencePage.java b/org.tizen.common.connection/src/org/tizen/common/connection/preference/TizenToolsPreferencePage.java
new file mode 100644 (file)
index 0000000..d1a2c17
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* Hyunsik Noh <hyunsik.noh@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.connection.preference;
+
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+public class TizenToolsPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+
+    public TizenToolsPreferencePage() {
+        String description = "Expand the tree to edit preferences for a specific feature";
+        setDescription( description );
+    }
+    @Override
+    public void init(IWorkbench workbench) {
+    }   
+
+    @Override
+    protected Control createContents(Composite parent) {
+        noDefaultAndApplyButton();
+        return null;
+    }
+}