From 8e5aa3ec9d8b8e904147e73a3e1a76f82c61125c Mon Sep 17 00:00:00 2001 From: "hyunsik.noh" Date: Thu, 20 Sep 2012 19:36:28 +0900 Subject: [PATCH] [Title]fix preferences page for tools [Type]enhancement [Module]common [Redmine#] Change-Id: I79fb9d354c559b67f0ec54628094d777d5fdbaad --- .../OSGI-INF/l10n/bundle.properties | 1 + org.tizen.common.connection/plugin.xml | 14 ++++++- .../connection/preference/PreferenceMessages.java | 3 +- .../preference/PreferenceMessages.properties | 9 ++-- .../TizenConnectionExplorerPreferencePage.java | 13 ++++-- .../preference/TizenToolsPreferencePage.java | 49 ++++++++++++++++++++++ 6 files changed, 78 insertions(+), 11 deletions(-) create mode 100644 org.tizen.common.connection/src/org/tizen/common/connection/preference/TizenToolsPreferencePage.java diff --git a/org.tizen.common.connection/OSGI-INF/l10n/bundle.properties b/org.tizen.common.connection/OSGI-INF/l10n/bundle.properties index af68969..cc41b01 100644 --- a/org.tizen.common.connection/OSGI-INF/l10n/bundle.properties +++ b/org.tizen.common.connection/OSGI-INF/l10n/bundle.properties @@ -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 diff --git a/org.tizen.common.connection/plugin.xml b/org.tizen.common.connection/plugin.xml index f6b3038..a04b4f5 100644 --- a/org.tizen.common.connection/plugin.xml +++ b/org.tizen.common.connection/plugin.xml @@ -23,10 +23,20 @@ + + + + + + category="org.tizen.common.connection.preferences.tizentools"> diff --git a/org.tizen.common.connection/src/org/tizen/common/connection/preference/PreferenceMessages.java b/org.tizen.common.connection/src/org/tizen/common/connection/preference/PreferenceMessages.java index 92a3d9b..4fa6b06 100644 --- a/org.tizen.common.connection/src/org/tizen/common/connection/preference/PreferenceMessages.java +++ b/org.tizen.common.connection/src/org/tizen/common/connection/preference/PreferenceMessages.java @@ -5,6 +5,7 @@ * * Contact: * Kangho Kim +* Hyunsik Noh * * 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; diff --git a/org.tizen.common.connection/src/org/tizen/common/connection/preference/PreferenceMessages.properties b/org.tizen.common.connection/src/org/tizen/common/connection/preference/PreferenceMessages.properties index 9a2d715..65661b0 100644 --- a/org.tizen.common.connection/src/org/tizen/common/connection/preference/PreferenceMessages.properties +++ b/org.tizen.common.connection/src/org/tizen/common/connection/preference/PreferenceMessages.properties @@ -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 diff --git a/org.tizen.common.connection/src/org/tizen/common/connection/preference/TizenConnectionExplorerPreferencePage.java b/org.tizen.common.connection/src/org/tizen/common/connection/preference/TizenConnectionExplorerPreferencePage.java index 75a53df..20c99bb 100644 --- a/org.tizen.common.connection/src/org/tizen/common/connection/preference/TizenConnectionExplorerPreferencePage.java +++ b/org.tizen.common.connection/src/org/tizen/common/connection/preference/TizenConnectionExplorerPreferencePage.java @@ -5,6 +5,7 @@ * * Contact: * Kangho Kim +* Hyunsik Noh * * 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 index 0000000..d1a2c17 --- /dev/null +++ b/org.tizen.common.connection/src/org/tizen/common/connection/preference/TizenToolsPreferencePage.java @@ -0,0 +1,49 @@ +/* +* Common +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Kangho Kim +* Hyunsik Noh +* +* 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; + } +} -- 2.7.4