From 0399cb777fe270bef7ffe789e37350bf3b34d6c8 Mon Sep 17 00:00:00 2001 From: David Dykstal Date: Thu, 19 Oct 2006 21:32:49 +0000 Subject: [PATCH] Bug 158296 - corrected preference pages and help Remote Systems - removed description, linked F1 to correct control Communications - removed description, linked F1 to correct control File Cache - removed superfluous instructions and description, improved help, changed button text to include "cached files", made note at the bottom a read-only text field. Files - removed description, linked F1 to correct control Logging - removed description Passwords - removed description SSL - changed description to read-only text field --- .../UniversalSecurityPreferencePage.java | 3 +- .../rse/files/ui/FileResources.properties | 4 +- .../SystemCachePreferencePage.java | 66 +++++++++---------- .../UniversalPreferencePage.java | 6 +- .../rse/logging/ui/LoggingPreferencePage.java | 8 +-- .../org.eclipse.rse.ui/HelpContexts.xml | 6 +- .../RemoteSystemsPreferencePage.java | 10 +-- .../propertypages/SignonPreferencePage.java | 2 +- .../SystemCommunicationsPreferencePage.java | 6 +- 9 files changed, 55 insertions(+), 56 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/UniversalSecurityPreferencePage.java b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/UniversalSecurityPreferencePage.java index 12a1d5c7c2f..2b2b5ecb78a 100644 --- a/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/UniversalSecurityPreferencePage.java +++ b/rse/plugins/org.eclipse.rse.dstore.security/src/org/eclipse/rse/dstore/security/preference/UniversalSecurityPreferencePage.java @@ -61,6 +61,7 @@ import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.swt.widgets.Text; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; @@ -100,7 +101,7 @@ public class UniversalSecurityPreferencePage extends PreferencePage implements composite.setLayout(layout); composite.setLayoutData(GridUtil.createFill()); - Label label = new Label(composite, SWT.NULL); + Text label = new Text(composite, SWT.READ_ONLY); label.setText(UniversalSecurityPlugin.getString(UniversalSecurityProperties.RESID_SECURITY_PREF_SEC_DESCRIPTION)); GridData data = new GridData(); data.horizontalSpan = 2; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/FileResources.properties b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/FileResources.properties index 577c791bae7..01cf3bd3814 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/FileResources.properties +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/FileResources.properties @@ -172,14 +172,14 @@ RESID_CONFLICT_DOWNLOAD_OPENWITHLOCAL= Open editor with pending changes # REMOTE FILE SYSTEM CACHE PREFERENCE PAGE #============================================================= RESID_PREF_CACHE_DESCRIPTION=When RSE is used for editing, the remote files are cached. Use this page to clear or limit the size of the file cache. -RESID_PREF_CACHE_CLEAR=Clear +RESID_PREF_CACHE_CLEAR=Clear Cached Files RESID_PREF_CACHE_CLEAR_LABEL=Clear cached files RESID_PREF_CACHE_CLEAR_TOOLTIP=Delete remote files that have been cached in the local workspace RESID_PREF_CACHE_MAX_CACHE_SIZE_LABEL=Maximum cache size (MB) RESID_PREF_CACHE_MAX_CACHE_SIZE_DESCRIPTION=Enter the maxium size space that can be used by the cache RESID_PREF_CACHE_MAX_CACHE_SIZE_TOOLTIP=Enter the maxium size space that can be used by the cache RESID_PREF_CACHE_CLEAR_WARNING_LABEL=Note: -RESID_PREF_CACHE_CLEAR_WARNING_DESCRIPTION=Clearing the cache closes all open remote files +RESID_PREF_CACHE_CLEAR_WARNING_DESCRIPTION=Note: Clearing the cache closes all open remote files #============================================================= # SUPERTRANSFER PROGRESS MONITOR diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemCachePreferencePage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemCachePreferencePage.java index 138fc76aaf8..0eceb6e459b 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemCachePreferencePage.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/SystemCachePreferencePage.java @@ -73,6 +73,7 @@ import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchPreferencePage; import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; import org.eclipse.ui.dialogs.ListSelectionDialog; import org.eclipse.ui.model.AdaptableList; import org.eclipse.ui.model.WorkbenchContentProvider; @@ -95,7 +96,7 @@ public class SystemCachePreferencePage extends PreferencePage implements IWorkbe { super(); setPreferenceStore(RSEUIPlugin.getDefault().getPreferenceStore()); - setDescription(FileResources.RESID_PREF_CACHE_DESCRIPTION); +// setDescription(FileResources.RESID_PREF_CACHE_DESCRIPTION); dwd descriptions are not readable by screen reader } /** @@ -104,6 +105,7 @@ public class SystemCachePreferencePage extends PreferencePage implements IWorkbe public void createControl(Composite parent) { super.createControl(parent); + PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), RSEUIPlugin.HELPPREFIX + "fchp0000"); } /** @@ -146,46 +148,42 @@ public class SystemCachePreferencePage extends PreferencePage implements IWorkbe } }); - Composite clearComp = SystemWidgetHelpers.createComposite(parent, 2); - layout = new GridLayout(); - layout.numColumns = 2; - clearComp.setLayout(layout); - clearComp.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING)); +// Composite clearComp = SystemWidgetHelpers.createComposite(parent, 2); +// layout = new GridLayout(); +// layout.numColumns = 2; +// clearComp.setLayout(layout); +// clearComp.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING)); - SystemWidgetHelpers.createLabel( - clearComp, - FileResources.RESID_PREF_CACHE_CLEAR_LABEL); - _clearButton = - SystemWidgetHelpers.createPushButton( - clearComp, - FileResources.RESID_PREF_CACHE_CLEAR, - this); +// SystemWidgetHelpers.createLabel( +// clearComp, +// FileResources.RESID_PREF_CACHE_CLEAR_LABEL); + _clearButton = SystemWidgetHelpers.createPushButton(parent, FileResources.RESID_PREF_CACHE_CLEAR, this); + _clearButton.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false)); _clearButton.setToolTipText(FileResources.RESID_PREF_CACHE_CLEAR_TOOLTIP); - gd = new GridData(); - gd.widthHint = 75; - _clearButton.setLayoutData(gd); +// gd = new GridData(); +// gd.widthHint = 75; +// _clearButton.setLayoutData(gd); - Composite warningComp = SystemWidgetHelpers.createComposite(clearComp, 2); - gd = new GridData(); - gd.horizontalSpan = 2; - warningComp.setLayoutData(gd); +// Composite warningComp = SystemWidgetHelpers.createComposite(clearComp, 2); +// gd = new GridData(); +// gd.horizontalSpan = 2; +// warningComp.setLayoutData(gd); - Display display = getControl().getDisplay(); - Label warningLabel = - SystemWidgetHelpers.createLabel( - warningComp, - FileResources.RESID_PREF_CACHE_CLEAR_WARNING_LABEL); - FontData oldData = warningLabel.getFont().getFontData()[0]; - FontData data = new FontData(oldData.getName(), oldData.getHeight(), SWT.BOLD); - Font fFont = new Font(display, data); +// Display display = getControl().getDisplay(); +// Label warningLabel = +// SystemWidgetHelpers.createLabel( +// warningComp, +// FileResources.RESID_PREF_CACHE_CLEAR_WARNING_LABEL); +// FontData oldData = warningLabel.getFont().getFontData()[0]; +// FontData data = new FontData(oldData.getName(), oldData.getHeight(), SWT.BOLD); +// Font fFont = new Font(display, data); +// warningLabel.setFont(fFont); - warningLabel.setFont(fFont); - SystemWidgetHelpers.createLabel( - warningComp, - FileResources.RESID_PREF_CACHE_CLEAR_WARNING_DESCRIPTION); + Text warning = new Text(parent, SWT.READ_ONLY); +// SystemWidgetHelpers.createReadonlyTextField(parent); + warning.setText(FileResources.RESID_PREF_CACHE_CLEAR_WARNING_DESCRIPTION); (new Mnemonics()).setOnPreferencePage(true).setMnemonics(parent); - SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "fchp0000"); initControls(); return parent; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/UniversalPreferencePage.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/UniversalPreferencePage.java index 06d0bfc8d55..26f646aea32 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/UniversalPreferencePage.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/propertypages/UniversalPreferencePage.java @@ -115,16 +115,15 @@ public class UniversalPreferencePage public UniversalPreferencePage() { super(GRID); setPreferenceStore(RSEUIPlugin.getDefault().getPreferenceStore()); - setDescription(FileResources.RESID_PREF_UNIVERSAL_FILES_TITLE); +// setDescription(FileResources.RESID_PREF_UNIVERSAL_FILES_TITLE); } /** * @see org.eclipse.jface.preference.PreferencePage#createControl(Composite) */ public void createControl(Composite parent) { - // added for 1GEUGE6: ITPJUI:WIN2000 - Help is the same on all preference pages super.createControl(parent); - + PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, RSEUIPlugin.HELPPREFIX+"ufpf0000"); } @@ -382,7 +381,6 @@ public class UniversalPreferencePage updateEnabledState(); (new Mnemonics()).setOnPreferencePage(true).setMnemonics(parent); - SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX+"ufpf0000"); } diff --git a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/ui/LoggingPreferencePage.java b/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/ui/LoggingPreferencePage.java index 082bc3d0bd0..aa5573c28a8 100644 --- a/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/ui/LoggingPreferencePage.java +++ b/rse/plugins/org.eclipse.rse.logging/src/org/eclipse/rse/logging/ui/LoggingPreferencePage.java @@ -131,10 +131,10 @@ public abstract class LoggingPreferencePage extends PreferencePage implements IW */ protected Control createContents(Composite parent) { Composite composite_tab = createComposite(parent, 1, 1); - String bundleName = (String)(getBundle().getHeaders().get(org.osgi.framework.Constants.BUNDLE_NAME)); - String topLabel1 = LoggingPreferenceLabels.LOGGING_PREFERENCE_PAGE_TOPLABEL1; - topLabel1 = MessageFormat.format(topLabel1, new Object[] {bundleName}); - createLabel(composite_tab, 1, topLabel1); +// String bundleName = (String)(getBundle().getHeaders().get(org.osgi.framework.Constants.BUNDLE_NAME)); +// String topLabel1 = LoggingPreferenceLabels.LOGGING_PREFERENCE_PAGE_TOPLABEL1; +// topLabel1 = MessageFormat.format(topLabel1, new Object[] {bundleName}); +// createLabel(composite_tab, 1, topLabel1); String topLabel2 = LoggingPreferenceLabels.LOGGING_PREFERENCE_PAGE_TOPLABEL2; Group group1 = createGroup(composite_tab, 1, 1, topLabel2); Set used = LabelUtil.usedFromString("ad"); // the mnemonics already used on preference page (in English) diff --git a/rse/plugins/org.eclipse.rse.ui/HelpContexts.xml b/rse/plugins/org.eclipse.rse.ui/HelpContexts.xml index 2967742485b..b16e90ba438 100644 --- a/rse/plugins/org.eclipse.rse.ui/HelpContexts.xml +++ b/rse/plugins/org.eclipse.rse.ui/HelpContexts.xml @@ -931,11 +931,11 @@ Use the port preference to change which local TCP/IP port the daemon uses to lis -This is the RSE file cache preference page. +This is the RSE file cache preference page. -Use this page to limit the amount of disk space used to store locally replicated remote files. +Remote files are cached locally when RSE is used for editing. Use the Maximum cache size settings to specify a limit to the amount of disk space used for this cache. -Use the clear button to remove all cached files. +Click the Clear Cached Files button to remove all cached files. Clearing the cache will close any editors open for these files. diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/RemoteSystemsPreferencePage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/RemoteSystemsPreferencePage.java index 5ed89d7e600..227f5c67841 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/RemoteSystemsPreferencePage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/RemoteSystemsPreferencePage.java @@ -19,6 +19,7 @@ package org.eclipse.rse.ui.propertypages; import java.util.Hashtable; import java.util.StringTokenizer; +import org.eclipse.core.runtime.Platform; import org.eclipse.jface.preference.FieldEditorPreferencePage; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.util.PropertyChangeEvent; @@ -38,6 +39,8 @@ import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.help.WorkbenchHelp; /** @@ -73,7 +76,7 @@ public class RemoteSystemsPreferencePage super(GRID); setTitle(SystemResources.RESID_PREF_ROOT_PAGE); setPreferenceStore(RSEUIPlugin.getDefault().getPreferenceStore()); - setDescription(SystemResources.RESID_PREF_ROOT_TITLE); +// setDescription(SystemResources.RESID_PREF_ROOT_TITLE); // removed since this is not read by screen reader } /** * We intercept to set the help @@ -81,6 +84,7 @@ public class RemoteSystemsPreferencePage public void createControl(Composite parent) { super.createControl(parent); + PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), RSEUIPlugin.HELPPREFIX+"rsep0000"); } /** @@ -187,9 +191,7 @@ public class RemoteSystemsPreferencePage **/ // set mnemonics (new Mnemonics()).setOnPreferencePage(true).setMnemonics(getFieldEditorParent()); - - // set help - SystemWidgetHelpers.setCompositeHelp(getFieldEditorParent(), RSEUIPlugin.HELPPREFIX+"rsep0000"); //$NON-NLS-1$ + } // --------------------------------------------------------- diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SignonPreferencePage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SignonPreferencePage.java index f5553bdc91d..4e4f91c41ab 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SignonPreferencePage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SignonPreferencePage.java @@ -184,7 +184,7 @@ public final class SignonPreferencePage extends PreferencePage implements IWorkb gd.grabExcessHorizontalSpace = true; gd.grabExcessVerticalSpace = true; - SystemWidgetHelpers.createLabel(page, SystemResources.RESID_PREF_SIGNON_DESCRIPTION, 2); +// SystemWidgetHelpers.createLabel(page, SystemResources.RESID_PREF_SIGNON_DESCRIPTION, 2); // Password table pwdTable = new Table(page, SWT.FULL_SELECTION |SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemCommunicationsPreferencePage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemCommunicationsPreferencePage.java index 88d59de7d11..ee12542f4ad 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemCommunicationsPreferencePage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemCommunicationsPreferencePage.java @@ -29,6 +29,7 @@ import org.eclipse.rse.ui.SystemWidgetHelpers; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; +import org.eclipse.ui.PlatformUI; /** @@ -47,7 +48,7 @@ public class SystemCommunicationsPreferencePage extends FieldEditorPreferencePag { super(GRID); setPreferenceStore(RSEUIPlugin.getDefault().getPreferenceStore()); - setDescription(SystemResources.RESID_PREF_COMMUNICATIONS_TITLE); +// setDescription(SystemResources.RESID_PREF_COMMUNICATIONS_TITLE); dwd description is not readable by screen reader } /** @@ -56,6 +57,7 @@ public class SystemCommunicationsPreferencePage extends FieldEditorPreferencePag public void createControl(Composite parent) { super.createControl(parent); + PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), RSEUIPlugin.HELPPREFIX + "cmmp0000"); } @@ -91,8 +93,6 @@ public class SystemCommunicationsPreferencePage extends FieldEditorPreferencePag (new Mnemonics()).setOnPreferencePage(true).setMnemonics(parent); - SystemWidgetHelpers.setCompositeHelp(parent, RSEUIPlugin.HELPPREFIX + "cmmp0000"); - } /**