diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SafeTreeViewer.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SafeTreeViewer.java index 8161febfbaf..c276c671cdc 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SafeTreeViewer.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SafeTreeViewer.java @@ -1,10 +1,10 @@ /******************************************************************************** * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * * Contributors: * Uwe Stieber (Wind River) - initial API and implementation. ********************************************************************************/ @@ -21,24 +21,24 @@ import org.eclipse.swt.widgets.Widget; /** * The SafeTreeViewer wraps an SWT TreeViewer in order to avoid * exceptions due to accessing already disposed items. - * + * * The main reason for this wrapping is that delayed label providers - * (i.e. instances of {@link IDelayedLabelDecorator}) can trigger tree - * item updates called in the viewer after the tree item itself got - * disposed already. This happens especially if items appear and - * disappear very fast within the tree which then will lead to nasty + * (i.e. instances of {@link IDelayedLabelDecorator}) can trigger tree + * item updates called in the viewer after the tree item itself got + * disposed already. This happens especially if items appear and + * disappear very fast within the tree which then will lead to nasty * SWT Widget already disposed exceptions. - * + * * Clients may subclass this class. - * + * * @since RSE 2.0 */ public class SafeTreeViewer extends TreeViewer { /** * Constructor. - * - * @param parent The parant control. + * + * @param parent The parent control. */ public SafeTreeViewer(Composite parent) { super(parent); @@ -46,7 +46,7 @@ public class SafeTreeViewer extends TreeViewer { /** * Constructor. - * + * * @param tree The tree control. */ public SafeTreeViewer(Tree tree) { @@ -55,7 +55,7 @@ public class SafeTreeViewer extends TreeViewer { /** * Constructor. - * + * * @param parent The parent control. * @param style The SWT style bits passed to the tree creation. */ diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMessages.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMessages.java index 9f568439cf5..62ccfd048f2 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMessages.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMessages.java @@ -7,10 +7,10 @@ * * Initial Contributors: * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, + * component that contains this file: David McKnight, Kushal Munir, + * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * + * * Contributors: * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands * API to the user actions plugin @@ -28,29 +28,29 @@ package org.eclipse.rse.ui; /** * Message IDs */ -public interface ISystemMessages +public interface ISystemMessages { public static final String MSG_WIZARD_PAGE_ERROR = "RSEG1240"; //$NON-NLS-1$ - + public static final String MSG_CONFIRM_RELOADRSE = "RSEG1002"; //$NON-NLS-1$ - + public static final String MSG_VALIDATE_NAME_EMPTY = "RSEG1006"; //$NON-NLS-1$ public static final String MSG_VALIDATE_NAME_NOTUNIQUE= "RSEG1007"; //$NON-NLS-1$ public static final String MSG_VALIDATE_NAME_NOTVALID = "RSEG1008"; //$NON-NLS-1$ public static final String MSG_VALIDATE_RENAME_NOTUNIQUE= "RSEG1010"; //MSG_VALIDATE_PREFIX + "ReName.NotUnique"; //$NON-NLS-1$ - public static final String MSG_VALIDATE_RENAME_OLDEQUALSNEW = "RSEG1009"; //MSG_VALIDATE_PREFIX+"ReName.OldEqualsNew"; //$NON-NLS-1$ - + public static final String MSG_VALIDATE_RENAME_OLDEQUALSNEW = "RSEG1009"; //MSG_VALIDATE_PREFIX+"ReName.OldEqualsNew"; //$NON-NLS-1$ + public static final String MSG_VALIDATE_PROFILENAME_EMPTY = "RSEG1014"; //$NON-NLS-1$ public static final String MSG_VALIDATE_PROFILENAME_NOTUNIQUE= "RSEG1015"; //$NON-NLS-1$ public static final String MSG_VALIDATE_PROFILENAME_NOTVALID = "RSEG1016"; //$NON-NLS-1$ public static final String MSG_VALIDATE_PROFILENAME_RESERVED = "RSEG1040"; //$NON-NLS-1$ - + public static final String MSG_VALIDATE_PATH_EMPTY = "RSEG1032"; //$NON-NLS-1$ public static final String MSG_VALIDATE_PATH_NOTUNIQUE= "RSEG1033"; //$NON-NLS-1$ public static final String MSG_VALIDATE_PATH_NOTVALID = "RSEG1034"; //$NON-NLS-1$ - + public static final String MSG_VALIDATE_NOT_NUMERIC = "RSEG1017"; //$NON-NLS-1$ public static final String MSG_VALIDATE_PORT_EMPTY = "RSEG1027"; //$NON-NLS-1$ public static final String MSG_VALIDATE_PORT_NOTVALID = "RSEG1028"; //$NON-NLS-1$ @@ -60,7 +60,7 @@ public interface ISystemMessages public static final String MSG_VALIDATE_CONNECTIONNAME_EMPTY= "RSEG1021"; //$NON-NLS-1$ public static final String MSG_VALIDATE_CONNECTIONNAME_NOTUNIQUE = "RSEG1022"; //$NON-NLS-1$ public static final String MSG_VALIDATE_CONNECTIONNAME_NOTUNIQUE_OTHERPROFILE = "RSEG1041"; //$NON-NLS-1$ - + public static final String MSG_VALIDATE_HOSTNAME_EMPTY= "RSEG1024"; //MSG_VALIDATE_PREFIX + "HostNameRequired"; //$NON-NLS-1$ public static final String MSG_VALIDATE_USERID_EMPTY = "RSEG1025"; //$NON-NLS-1$ public static final String MSG_VALIDATE_USERID_NOTVALID = "RSEG1026"; //$NON-NLS-1$ @@ -71,10 +71,10 @@ public interface ISystemMessages public static final String MSG_VALIDATE_FILTERPOOLNAME_EMPTY = "RSEG1037"; //$NON-NLS-1$ public static final String MSG_VALIDATE_FILTERPOOLNAME_NOTUNIQUE= "RSEG1038"; //$NON-NLS-1$ - + public static final String MSG_VALIDATE_FILTERNAME_EMPTY = "RSEG1042"; //$NON-NLS-1$ public static final String MSG_VALIDATE_FILTERNAME_NOTUNIQUE= "RSEG1043"; //$NON-NLS-1$ - + public static final String MSG_VALIDATE_PASSWORD_EMPTY = "RSEG1035"; //MSG_VALIDATE_PREFIX + "PasswordRequired"; //$NON-NLS-1$ public static final String MSG_VALIDATE_FILTERSTRING_EMPTY = "RSEG1045"; //$NON-NLS-1$ @@ -85,21 +85,21 @@ public interface ISystemMessages public static final String MSG_VALIDATE_NUMBER_EMPTY = "RSEG1170"; //$NON-NLS-1$ public static final String MSG_VALIDATE_NUMBER_NOTVALID = "RSEG1171"; //$NON-NLS-1$ public static final String MSG_VALIDATE_NUMBER_OUTOFRANGE= "RSEG1172"; //$NON-NLS-1$ - + public static final String MSG_CONFIRM_DELETE = "RSEG1052"; //$NON-NLS-1$ public static final String MSG_CONFIRM_CHANGES = "RSEG1201"; //$NON-NLS-1$ - - //public static final String MSG_SAVE_PREFIX = MSG_PREFIX + "Save."; + + //public static final String MSG_SAVE_PREFIX = MSG_PREFIX + "Save."; public static final String MSG_SAVE_FAILED = "RSEG1050"; //MSG_SAVE_PREFIX + "Failed"; //$NON-NLS-1$ - //public static final String MSG_EXCEPTION_PREFIX = MSG_PREFIX + "Exception."; + //public static final String MSG_EXCEPTION_PREFIX = MSG_PREFIX + "Exception."; public static final String MSG_EXCEPTION_OCCURRED = "RSEG1003"; //$NON-NLS-1$ public static final String MSG_EXCEPTION_DELETING = "RSEG1063"; //""RSEG1004"; //$NON-NLS-1$ public static final String MSG_EXCEPTION_RENAMING = "RSEG1064"; //"RSEG1005"; //MSG_EXCEPTION_PREFIX + "Renaming"; //$NON-NLS-1$ - + //public static final String MSG_QUERY_PREFIX = MSG_PREFIX + "Query."; public static final String MSG_QUERY_PROGRESS = "RSEG1095"; //$NON-NLS-1$ @@ -127,8 +127,8 @@ public interface ISystemMessages public static final String MSG_MOVEFILTERSTRINGS_PROGRESS="RSEG1090"; //$NON-NLS-1$ public static final String MSG_MOVEFILTERSTRING_PROGRESS ="RSEG1091"; //$NON-NLS-1$ public static final String MSG_MOVEFILTERPOOL_COMPLETE = "RSEG1092"; //$NON-NLS-1$ - - + + public static final String MSG_COPYGENERIC_PROGRESS = "RSEG1115"; //$NON-NLS-1$ public static final String MSG_MOVEGENERIC_PROGRESS = "RSEG1116"; //$NON-NLS-1$ public static final String MSG_COPYTHINGGENERIC_PROGRESS = "RSEG1117"; //$NON-NLS-1$ @@ -141,14 +141,14 @@ public interface ISystemMessages public static final String MSG_VALIDATE_SRCTYPE_EMPTY = "RSEG1192"; //$NON-NLS-1$ public static final String MSG_VALIDATE_SRCTYPE_NOTVALID = "RSEG1193"; //$NON-NLS-1$ public static final String MSG_VALIDATE_SRCTYPE_NOTUNIQUE= "RSEG1194"; //$NON-NLS-1$ - + public static final String MSG_VALIDATE_ARCHIVE_NAME = "RSEG1120"; //$NON-NLS-1$ public static final String MSG_FILTERPOOL_CREATED = "RSEG1160"; // defect 42503 //$NON-NLS-1$ public static final String MSG_UPDATEFILTER_FAILED = "RSEG1161"; //$NON-NLS-1$ public static final String MSG_RENAMEFILTER_FAILED = "RSEG1162"; //$NON-NLS-1$ - + //public static final String MSG_OPERATION_PREFIX = MSG_PREFIX + "Operation."; public static final String MSG_OPERATION_FAILED = "RSEG1066"; //$NON-NLS-1$ public static final String MSG_OPERATION_CANCELLED = "RSEG1067"; //$NON-NLS-1$ @@ -156,24 +156,23 @@ public interface ISystemMessages public static final String MSG_HOSTNAME_NOTFOUND = "RSEG1220"; //$NON-NLS-1$ public static final String MSG_HOSTNAME_VERIFYING = "RSEG1221"; //$NON-NLS-1$ - - + + public static final String MSG_ENCODING_NOT_SUPPORTED = "RSEG1244"; //$NON-NLS-1$ - - + + // -------------------------- // UNIVERSAL FILE MESSAGES... - // -------------------------- + // -------------------------- + /** @since 3.0 */ public static final String FILEMSG_RENAME_INTERRUPTED = "RSEG1246"; //$NON-NLS-1$ - /** - * @since 3.0 - */ + /** @since 3.0 */ public static final String FILEMSG_DELETE_INTERRUPTED = "RSEG1247"; //$NON-NLS-1$ // -------------------------- // SYSTEM VIEW MESSAGES... - // -------------------------- + // -------------------------- //public static final String MSG_EXPAND_PREFIX = MSG_PREFIX + "Expand."; public static final String MSG_EXPAND_FAILED = "RSEG1098"; //MSG_EXPAND_PREFIX + "Failed"; //$NON-NLS-1$ public static final String MSG_EXPAND_CANCELLED = "RSEG1067"; //MSG_EXPAND_PREFIX + "Cancelled"; //$NON-NLS-1$ @@ -182,7 +181,7 @@ public interface ISystemMessages public static final String MSG_EXPAND_EMPTY = "RSEG1100"; //MSG_EXPAND_PREFIX + "Empty"; //$NON-NLS-1$ public static final String MSG_EXPAND_FILTERCREATED = "RSEG1102"; //MSG_EXPAND_PREFIX + "FilterCreated"; //$NON-NLS-1$ public static final String MSG_EXPAND_CONNECTIONCREATED = "RSEG1108"; //MSG_EXPAND_PREFIX + "ConnectionCreated"; //$NON-NLS-1$ - + //public static final String MSG_LIST_PREFIX = MSG_PREFIX + "List."; public static final String MSG_LIST_CANCELLED = "RSEG1101"; //MSG_LIST_PREFIX + "Cancelled"; //$NON-NLS-1$ @@ -197,7 +196,7 @@ public interface ISystemMessages // -------------------------- // Generic messages, must substitute in values... - // -------------------------- + // -------------------------- public static final String MSG_GENERIC_I = "RSEO1010"; //$NON-NLS-1$ public static final String MSG_GENERIC_W = "RSEO1011"; //$NON-NLS-1$ public static final String MSG_GENERIC_E = "RSEO1012"; //$NON-NLS-1$ @@ -213,7 +212,7 @@ public interface ISystemMessages // ---------------------------------- // COMMUNICATIONS ERROR CHECKING MESSAGES... // ---------------------------------- - + public static final String MSG_COMM_PWD_INVALID = "RSEC1004"; //$NON-NLS-1$ public static final String MSG_COMM_PWD_EXISTS = "RSEC2101"; //$NON-NLS-1$ @@ -223,14 +222,14 @@ public interface ISystemMessages public static final String MSG_COMM_ENVVAR_DUPLICATE = "RSEC2001"; //$NON-NLS-1$ public static final String MSG_COMM_ENVVAR_NONAME = "RSEC2002"; //$NON-NLS-1$ public static final String MSG_COMM_ENVVAR_INVALIDCHAR = "RSEC2004"; //$NON-NLS-1$ - + public static final String MSG_COMM_PORT_WARNING = "RSEC2306"; //$NON-NLS-1$ // Unexpected error message public static final String MSG_ERROR_UNEXPECTED = "RSEF8002"; //$NON-NLS-1$ - - // file transfer message + + // file transfer message public static final String MSG_TRANSFER_INVALID = "RSEG1270"; //$NON-NLS-1$ - + } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEAdapter.java index 854aca61971..8f9c3128978 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEAdapter.java @@ -19,8 +19,10 @@ package org.eclipse.rse.ui; import org.eclipse.ui.model.WorkbenchAdapter; /** - * Abstract base class with basic implementations of the IRSEAdapter interface. - * Intended to be subclassed. + * Abstract base class with basic implementations of the + * IRSEAdapter interface. Intended to be subclassed. + * + * @since org.eclipse.rse.ui 3.0 */ public abstract class RSEAdapter extends WorkbenchAdapter implements IRSEAdapter { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java index dcd6164e4fa..631c83bb407 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java @@ -1,15 +1,15 @@ /******************************************************************************** * Copyright (c) 2006, 2008 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is + * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html - * + * * Initial Contributors: * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, + * component that contains this file: David McKnight, Kushal Munir, + * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * + * * Contributors: * David Dykstal (IBM) - moved methods to SystemPreferencesManager. * Uwe Stieber (Wind River) - bugfixing. @@ -26,9 +26,9 @@ * David Dykstal (IBM) - [189858] Delay the creation of the remote systems project * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands * API to the user actions plugin - * David Dykstal (IBM) - [191038] initialize SystemRegistryUI without a log file, it was not used - * David McKnight (IBM) - [196838] Don't recreate local after it has been deleted - * David Dykstal (IBM) - [197036] formatted the initialize job to be able to read it + * David Dykstal (IBM) - [191038] initialize SystemRegistryUI without a log file, it was not used + * David McKnight (IBM) - [196838] Don't recreate local after it has been deleted + * David Dykstal (IBM) - [197036] formatted the initialize job to be able to read it * Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core * David Dykstal (IBM) - [197167] adding notification and waiting for RSE model * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types @@ -72,30 +72,30 @@ import org.osgi.framework.BundleContext; */ public class RSEUIPlugin extends SystemBasePlugin { - - public static final String PLUGIN_ID = "org.eclipse.rse.ui"; //$NON-NLS-1$ + + public static final String PLUGIN_ID = "org.eclipse.rse.ui"; //$NON-NLS-1$ public static final String HELPPREFIX = "org.eclipse.rse.ui."; //$NON-NLS-1$ - + public static final boolean INCLUDE_LOCAL_YES = true; public static final boolean INCLUDE_LOCAL_NO = false; private static RSEUIPlugin inst = null; - - private static SystemMessageFile messageFile = null; - private static SystemMessageFile defaultMessageFile = null; + + private static SystemMessageFile messageFile = null; + private static SystemMessageFile defaultMessageFile = null; private Vector viewSuppliers = new Vector(); private SystemViewAdapterFactory svaf; // for fastpath access private SystemTeamViewResourceAdapterFactory svraf; // for fastpath private boolean loggingSystemMessageLine = false; - + /** * Constructor for SystemsPlugin */ - public RSEUIPlugin() + public RSEUIPlugin() { super(); - - if (inst == null) + + if (inst == null) { inst = this; } @@ -105,7 +105,7 @@ public class RSEUIPlugin extends SystemBasePlugin * Return singleton. Same as inherited getBaseDefault but returned object * is typed as RSEUIPlugin versus SystemBasePlugin. */ - public static RSEUIPlugin getDefault() + public static RSEUIPlugin getDefault() { return inst; } @@ -119,7 +119,7 @@ public class RSEUIPlugin extends SystemBasePlugin /** * Set whether or not to log the messages shown on the system message line for dialogs - * and wizards. These message are typically validation messages for fields. + * and wizards. These message are typically validation messages for fields. * These are logged using the RSE logging settings. The default is to not log * these messages. * @param flag true if logging of these messages is desired, false otherwise. @@ -127,18 +127,18 @@ public class RSEUIPlugin extends SystemBasePlugin public void setLoggingSystemMessageLine(boolean flag) { loggingSystemMessageLine = flag; } - + /** * @return true if we are logging messages displayed on the system message line. */ public boolean getLoggingSystemMessageLine() { return loggingSystemMessageLine; } - + /* (non-Javadoc) * @see org.eclipse.rse.core.SystemBasePlugin#initializeImageRegistry() */ - protected void initializeImageRegistry() + protected void initializeImageRegistry() { //SystemElapsedTimer timer = new SystemElapsedTimer(); //timer.setStartTime(); @@ -150,7 +150,7 @@ public class RSEUIPlugin extends SystemBasePlugin */ putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEWPROFILEWIZARD_ID, path+ISystemIconConstants.ICON_SYSTEM_NEWPROFILEWIZARD); - + putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEWCONNECTIONWIZARD_ID, path+ISystemIconConstants.ICON_SYSTEM_NEWCONNECTIONWIZARD); putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEWFILTERPOOLWIZARD_ID, @@ -162,10 +162,10 @@ public class RSEUIPlugin extends SystemBasePlugin putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEWFILEWIZARD_ID, path+ISystemIconConstants.ICON_SYSTEM_NEWFILEWIZARD); putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEWFOLDERWIZARD_ID, - path+ISystemIconConstants.ICON_SYSTEM_NEWFOLDERWIZARD); + path+ISystemIconConstants.ICON_SYSTEM_NEWFOLDERWIZARD); // Things... - + putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_PROFILE_ID, path+ISystemIconConstants.ICON_SYSTEM_PROFILE); putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_PROFILE_ACTIVE_ID, @@ -190,13 +190,13 @@ public class RSEUIPlugin extends SystemBasePlugin path+ISystemIconConstants.ICON_SYSTEM_ROOTDRIVE); putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_ROOTDRIVEOPEN_ID, path+ISystemIconConstants.ICON_SYSTEM_ROOTDRIVEOPEN); - + putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_PROCESS_ID, path+ISystemIconConstants.ICON_SYSTEM_PROCESS); // putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_TARGET_ID, // path+ISystemIconConstants.ICON_SYSTEM_TARGET); - + // Message icons: REDUNDANT /* putImageInRegistry(ISystemConstants.ICON_SYSTEM_SMALLERROR_ID, @@ -240,13 +240,13 @@ public class RSEUIPlugin extends SystemBasePlugin path+ISystemIconConstants.ICON_SYSTEM_MOVE); putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_CLEAR_ID, path+ISystemIconConstants.ICON_SYSTEM_CLEAR); - + putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_CLEAR_ALL_ID, - path+ISystemIconConstants.ICON_SYSTEM_CLEAR_ALL); + path+ISystemIconConstants.ICON_SYSTEM_CLEAR_ALL); putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_CLEAR_SELECTED_ID, - path+ISystemIconConstants.ICON_SYSTEM_CLEAR_SELECTED); - - + path+ISystemIconConstants.ICON_SYSTEM_CLEAR_SELECTED); + + //putImageInRegistry(ISystemConstants.ICON_SYSTEM_DELETE_ID, // path+ISystemConstants.ICON_SYSTEM_DELETE); putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_DELETEREF_ID, @@ -254,9 +254,9 @@ public class RSEUIPlugin extends SystemBasePlugin putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_RENAME_ID, path+ISystemIconConstants.ICON_SYSTEM_RENAME); putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_RUN_ID, - path+ISystemIconConstants.ICON_SYSTEM_RUN); + path+ISystemIconConstants.ICON_SYSTEM_RUN); putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_STOP_ID, - path+ISystemIconConstants.ICON_SYSTEM_STOP); + path+ISystemIconConstants.ICON_SYSTEM_STOP); // putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_COMPILE_ID, // path+ISystemIconConstants.ICON_SYSTEM_COMPILE); putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEACTIVE_ID, @@ -283,7 +283,7 @@ public class RSEUIPlugin extends SystemBasePlugin putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_REFRESH_ID, path+ISystemIconConstants.ICON_SYSTEM_REFRESH); - + putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEWFILE_ID, path+ISystemIconConstants.ICON_SYSTEM_NEWFILE); putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_NEWFOLDER_ID, @@ -291,24 +291,24 @@ public class RSEUIPlugin extends SystemBasePlugin //putImageInRegistry(ISystemConstants.ICON_SYSTEM_COLLAPSEALL_ID, // path+ISystemConstants.ICON_SYSTEM_COLLAPSEALL); // defect 41203 D54577 - - - + + + // System view icons... //putImageInRegistry(ISystemConstants.ICON_SYSTEM_VIEW_ID, // only needed from plugin.xml - // path+ISystemConstants.ICON_SYSTEM_VIEW); + // path+ISystemConstants.ICON_SYSTEM_VIEW); putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_ERROR_ID, path+ISystemIconConstants.ICON_SYSTEM_ERROR); - + putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_INFO_ID, path+ISystemIconConstants.ICON_SYSTEM_INFO); - + putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_INFO_TREE_ID, path+ISystemIconConstants.ICON_SYSTEM_INFO_TREE); - + putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_CANCEL_ID, path+ISystemIconConstants.ICON_SYSTEM_CANCEL); putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_HELP_ID, @@ -317,30 +317,30 @@ public class RSEUIPlugin extends SystemBasePlugin putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_EMPTY_ID, path+ISystemIconConstants.ICON_SYSTEM_EMPTY); putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_OK_ID, - path+ISystemIconConstants.ICON_SYSTEM_OK); + path+ISystemIconConstants.ICON_SYSTEM_OK); putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_WARNING_ID, - path+ISystemIconConstants.ICON_SYSTEM_WARNING); - + path+ISystemIconConstants.ICON_SYSTEM_WARNING); + putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_BLANK_ID, path+ISystemIconConstants.ICON_SYSTEM_BLANK); - + putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_SEARCH_ID, - path+ISystemIconConstants.ICON_SYSTEM_SEARCH); + path+ISystemIconConstants.ICON_SYSTEM_SEARCH); putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_SEARCH_RESULT_ID, - path+ISystemIconConstants.ICON_SYSTEM_SEARCH_RESULT); - + path+ISystemIconConstants.ICON_SYSTEM_SEARCH_RESULT); + putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_SHOW_TABLE_ID, - path + ISystemIconConstants.ICON_SYSTEM_SHOW_TABLE); - + path + ISystemIconConstants.ICON_SYSTEM_SHOW_TABLE); + putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_SHOW_MONITOR_ID, - path + ISystemIconConstants.ICON_SYSTEM_SHOW_MONITOR); - + path + ISystemIconConstants.ICON_SYSTEM_SHOW_MONITOR); + putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_PERSPECTIVE_ID, - path + ISystemIconConstants.ICON_SYSTEM_PERSPECTIVE); - + path + ISystemIconConstants.ICON_SYSTEM_PERSPECTIVE); + putImageInRegistry(ISystemIconConstants.ICON_SEARCH_REMOVE_SELECTED_MATCHES_ID, path + ISystemIconConstants.ICON_SEARCH_REMOVE_SELECTED_MATCHES); - + putImageInRegistry(ISystemIconConstants.ICON_SEARCH_REMOVE_ALL_MATCHES_ID, path + ISystemIconConstants.ICON_SEARCH_REMOVE_ALL_MATCHES); @@ -352,75 +352,77 @@ public class RSEUIPlugin extends SystemBasePlugin putImageInRegistry(ISystemConstants.ICON_INHERITWIDGET_INTERIM_ID, path+ISystemConstants.ICON_INHERITWIDGET_INTERIM); */ - + putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_ARROW_UP_ID, path+ISystemIconConstants.ICON_SYSTEM_ARROW_UP); putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_ARROW_DOWN_ID, path+ISystemIconConstants.ICON_SYSTEM_ARROW_DOWN); - + putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_CONNECTOR_SERVICE_ID, path+ISystemIconConstants.ICON_SYSTEM_CONNECTOR_SERVICE); - + putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_SERVICE_ID, path+ISystemIconConstants.ICON_SYSTEM_SERVICE); - + putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_LAUNCHER_CONFIGURATION_ID, path+ISystemIconConstants.ICON_SYSTEM_LAUNCHER_CONFIGURATION); - + putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_PROPERTIES_ID, path+ISystemIconConstants.ICON_SYSTEM_PROPERTIES); - - // close to 1 second... + + // close to 1 second... //timer.setEndTime(); //System.out.println("Time to load images: "+timer); } - - + + /** * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) */ - public void start(BundleContext context) throws Exception + public void start(BundleContext context) throws Exception { super.start(context); - + messageFile = getMessageFile("systemmessages.xml"); //$NON-NLS-1$ defaultMessageFile = getDefaultMessageFile("systemmessages.xml"); //$NON-NLS-1$ - + //Force load the SystemRegistry - TODO Is this really necessary? RSECorePlugin.getTheSystemRegistry(); - + IAdapterManager manager = Platform.getAdapterManager(); - + // DKM // for subsystem factories SubSystemConfigurationAdapterFactory ssfaf = new SubSystemConfigurationAdapterFactory(); ssfaf.registerWithManager(manager); - + RSESystemTypeAdapterFactory rseSysTypeFactory = new RSESystemTypeAdapterFactory(); rseSysTypeFactory.registerWithManager(manager); - + manager.registerAdapters(new SubSystemConfigurationProxyAdapterFactory(), ISubSystemConfigurationProxy.class); - + svaf = new SystemViewAdapterFactory(); svaf.registerWithManager(manager); svraf = new SystemTeamViewResourceAdapterFactory(); svraf.registerWithManager(manager); - + Job initJob = new RSEUIInitJob(); initJob.schedule(); } /** - * For fastpath access to our adapters for non-local objects in our model. - * Exploits the knowledge we use singleton adapters. - */ + * For fastpath access to our adapters for non-local objects in our model. + * Exploits the knowledge we use singleton adapters. + * + * @since 3.0 returning IAdapterFactory rather than SystemViewAdapterFactory + */ public IAdapterFactory getSystemViewAdapterFactory() { return svaf; } - + /** * Restart the whole thing after a team synchronization */ @@ -428,7 +430,7 @@ public class RSEUIPlugin extends SystemBasePlugin { if (RSECorePlugin.isTheSystemRegistryActive()) { ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry(); - + // disconnect all active connections disconnectAll(false); // don't save ? // collapse and flush all nodes in all views @@ -436,7 +438,7 @@ public class RSEUIPlugin extends SystemBasePlugin // allow child classes to override closeViews(); - + // clear in-memory settings for all filter pools and subsystems ISubSystemConfigurationProxy[] proxies = sr.getSubSystemConfigurationProxies(); if (proxies != null) { @@ -455,9 +457,9 @@ public class RSEUIPlugin extends SystemBasePlugin for (int idx=0; idx < proxies.length; idx++) proxies[idx].restore(); } - + // refresh GUIs - sr.fireEvent(new SystemResourceChangeEvent(sr, ISystemResourceChangeEvents.EVENT_REFRESH, null)); + sr.fireEvent(new SystemResourceChangeEvent(sr, ISystemResourceChangeEvents.EVENT_REFRESH, null)); // allow child classes to override openViews(); @@ -498,15 +500,15 @@ public class RSEUIPlugin extends SystemBasePlugin * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) */ public void stop(BundleContext context) throws Exception { - - + + // disconnect all active connections disconnectAll(true); - + // remove workspace listener for our project SystemResourceManager.endResourceEventListening(); - + // call this last super.stop(context); } @@ -551,7 +553,7 @@ public class RSEUIPlugin extends SystemBasePlugin } } } - + /** * Test if the SystemRegistry has been instantiated already. * Use this when you don't want to start the system registry as a side effect of retrieving it. @@ -562,7 +564,7 @@ public class RSEUIPlugin extends SystemBasePlugin { return RSECorePlugin.isTheSystemRegistryActive(); } - + /** * Return the persistence manager used for persisting RSE profiles. * @return the persistence manager used for persisting RSE profiles @@ -572,7 +574,7 @@ public class RSEUIPlugin extends SystemBasePlugin { return RSECorePlugin.getThePersistenceManager(); } - + /** * Return the SystemRegistryUI singleton. * @return the SystemRegistryUI singleton. @@ -581,7 +583,7 @@ public class RSEUIPlugin extends SystemBasePlugin { return SystemRegistryUI.getInstance(); } - + /** * Return the master profile manager singleton. * @return the RSE Profile Manager Singleton. @@ -618,8 +620,8 @@ public class RSEUIPlugin extends SystemBasePlugin */ public SystemMessageFile getMessageFile(String messageFileName) { - return loadMessageFile(getBundle(), messageFileName); - } + return loadMessageFile(getBundle(), messageFileName); + } /** * Load a default message file for this plugin for cases where messages haven't been translated. @@ -628,9 +630,9 @@ public class RSEUIPlugin extends SystemBasePlugin */ public SystemMessageFile getDefaultMessageFile(String messageFileName) { - return loadDefaultMessageFile(getBundle(), messageFileName); - } - + return loadDefaultMessageFile(getBundle(), messageFileName); + } + /** * Return this plugin's message file. Assumes it has already been loaded via a call to getMessageFile. */ @@ -638,12 +640,12 @@ public class RSEUIPlugin extends SystemBasePlugin { return messageFile; } - + public SystemMessage getMessage(String msgId) { return getPluginMessage(msgId); } - + /** * Retrieve a message from this plugin's message file * @param msgId - the ID of the message to retrieve. This is the concatenation of the @@ -716,5 +718,5 @@ public class RSEUIPlugin extends SystemBasePlugin if (viewSuppliers.contains(vs)) viewSuppliers.remove(vs); } - + } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayHidableSystemMessageAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayHidableSystemMessageAction.java index 0d2b202577c..68fe4f61507 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayHidableSystemMessageAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/DisplayHidableSystemMessageAction.java @@ -22,15 +22,21 @@ public class DisplayHidableSystemMessageAction extends { protected IPreferenceStore _store; protected String _prefID; + /** + * @since 3.0 + */ protected boolean _showYesNo = true; - + public DisplayHidableSystemMessageAction(SystemMessage message, IPreferenceStore prefStore, String prefID) { super(message); _store = prefStore; _prefID = prefID; } - + + /** + * @since 3.0 + */ public DisplayHidableSystemMessageAction(SystemMessage message, IPreferenceStore prefStore, String prefID, boolean showYesNo) { super(message); @@ -53,7 +59,7 @@ public class DisplayHidableSystemMessageAction extends dialog.openQuestionNoException(_showYesNo); rc = dialog.getButtonPressedId(); finished = true; - } + } } } } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseCopyAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseCopyAction.java index 2c3ccad3db9..59463ba4b27 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseCopyAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseCopyAction.java @@ -277,6 +277,7 @@ public abstract class SystemBaseCopyAction extends SystemBaseDialogAction /** * Called after all the copy/move operations end, be it successfully or not. * Your opportunity to display completion or do post-copy selections/refreshes + * @since 3.0 taking String argument */ public void copyComplete(String operation) {} diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseSubMenuAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseSubMenuAction.java index d549ebb879b..c12b4604af9 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseSubMenuAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemBaseSubMenuAction.java @@ -7,10 +7,10 @@ * * Initial Contributors: * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, + * component that contains this file: David McKnight, Kushal Munir, + * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * + * * Contributors: * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types *******************************************************************************/ @@ -34,19 +34,19 @@ import org.eclipse.swt.widgets.Shell; /** * Our framework is designed to allow actions to be added to popup menus. - * Sometimes, we want an expandable or cascading menu item for an action. + * Sometimes, we want an expandable or cascading menu item for an action. * That is what this class is designed for. It represents a populated submenu. */ public abstract class SystemBaseSubMenuAction extends SystemBaseAction { - + private SystemSubMenuManager subMenu = null; protected String actionLabel; protected String menuID; protected boolean createMenuEachTime = true; - protected boolean populateMenuEachTime = true; + protected boolean populateMenuEachTime = true; private boolean dontCascade = false; private boolean test; private static final IAction[] EMPTY_ACTION_ARRAY = new IAction[0]; @@ -57,14 +57,14 @@ public abstract class SystemBaseSubMenuAction * @param tooltip * @param image The image to display for this action * @param shell the parent shell. If you pass null now, be sure to call {@link #setShell(Shell)} later. - * + * * @deprecated use fields from resource class directly now instead of via ResourceBundle - */ + */ protected SystemBaseSubMenuAction(ResourceBundle rb, String label, String tooltip,ImageDescriptor image,Shell shell) { super(label, tooltip, image, shell); actionLabel = label; - //setTracing(true); + //setTracing(true); } @@ -73,7 +73,7 @@ public abstract class SystemBaseSubMenuAction * @param label the label to display. * @param shell the parent shell. If you pass null now, be sure to call {@link #setShell(Shell)} later. */ - protected SystemBaseSubMenuAction(String label, Shell shell) + protected SystemBaseSubMenuAction(String label, Shell shell) { super(label, shell); actionLabel = label; @@ -85,7 +85,7 @@ public abstract class SystemBaseSubMenuAction * @param tooltip the tooltip to display. * @param shell the parent shell. If you pass null now, be sure to call {@link #setShell(Shell)} later. */ - protected SystemBaseSubMenuAction(String label, String tooltip, Shell shell) + protected SystemBaseSubMenuAction(String label, String tooltip, Shell shell) { super(label, tooltip, shell); actionLabel = label; @@ -97,13 +97,13 @@ public abstract class SystemBaseSubMenuAction * @param image the image descriptor for the action. * @param shell the parent shell. If you pass null now, be sure to call {@link #setShell(Shell)} later. */ - protected SystemBaseSubMenuAction(String label, ImageDescriptor image, Shell shell) + protected SystemBaseSubMenuAction(String label, ImageDescriptor image, Shell shell) { super(label, image, shell); actionLabel = label; //setTracing(true); } - + /** * Constructor for SystemBaseSubMenuAction when there is just a string and image * @param label the label to display. @@ -111,7 +111,7 @@ public abstract class SystemBaseSubMenuAction * @param image the image descriptor for the action. * @param shell the parent shell. If you pass null now, be sure to call {@link #setShell(Shell)} later. */ - protected SystemBaseSubMenuAction(String label, String tooltip, ImageDescriptor image, Shell shell) + protected SystemBaseSubMenuAction(String label, String tooltip, ImageDescriptor image, Shell shell) { super(label, tooltip, image, shell); actionLabel = label; @@ -142,7 +142,7 @@ public abstract class SystemBaseSubMenuAction { this.populateMenuEachTime = eachTime; } - + /** * Set test mode on */ @@ -151,7 +151,7 @@ public abstract class SystemBaseSubMenuAction this.test = testMode; } - + /** * Must be overridden *

Example of this:

@@ -209,32 +209,32 @@ public abstract class SystemBaseSubMenuAction //System.out.println("SubMenu's menu null? " + (m==null)); //if (m != null) //m.addMenuListener(new SystemViewMenuListener()); - } + } else if (traceSelections) { issueTraceMessage("*** INSIDE GETSUBMENU for "+actionLabel+". SUBMENU ALREADY CREATED. "); //$NON-NLS-1$ //$NON-NLS-2$ } - + return subMenu; } /** * Creates the standard groups for the context sub-menu. */ - protected void createStandardGroups(IMenuManager menu) + protected void createStandardGroups(IMenuManager menu) { if (!menu.isEmpty()) - return; + return; // simply sets partitions in the menu, into which actions can be directed. // Each partition can be delimited by a separator (new Separator) or not (new GroupMarker). // Deleted groups are not used yet. //... decided it is better to let this get created when needed, else will be at the top of the menu. //menu.add(new Separator(ISystemContextMenuConstants.GROUP_ADDITIONS)); // user or BP/ISV additions - + } - + /** * Return the actions currently in the menu. - * Never returns null, but may return an empty array. + * Never returns null, but may return an empty array. */ public IAction[] getActions() { @@ -264,17 +264,21 @@ public abstract class SystemBaseSubMenuAction } - - /** - * Overridable method that instantiates the menu listener who job is to add mnemonics. - * @param setMnemonicsOnlyOnce true if the menu is static and so mnemonics need only be set once. False if it is dynamic - */ + + /** + * Overridable method that instantiates the menu listener who job is to add + * mnemonics. + * + * @param setMnemonicsOnlyOnce true if the menu is static and so mnemonics + * need only be set once. False if it is dynamic + * @since 3.0 replaced SystemViewMenuListener by ISystemViewMenuListener + */ protected ISystemViewMenuListener createMnemonicsListener(boolean setMnemonicsOnlyOnce) { return new SystemViewMenuListener(setMnemonicsOnlyOnce); } - - /** + + /** * Sets the parent shell for this action. This is an override of our parent's method so we can * cascade it to each sub-action. */ @@ -284,29 +288,29 @@ public abstract class SystemBaseSubMenuAction if (!dontCascade) cascadeShell(); } - - /** - * This is called by the framework to set the selection input, just prior to showing the popup menu. - * We cascade this down to all of the actions added to this submenu. - */ - public void setSelection(ISelection selection) - { - super.setSelection(selection); - if (!dontCascade) - cascadeSelection(selection); - } /** * This is called by the framework to set the selection input, just prior to showing the popup menu. * We cascade this down to all of the actions added to this submenu. */ - public void setViewer(Viewer v) - { + public void setSelection(ISelection selection) + { + super.setSelection(selection); + if (!dontCascade) + cascadeSelection(selection); + } + + /** + * This is called by the framework to set the selection input, just prior to showing the popup menu. + * We cascade this down to all of the actions added to this submenu. + */ + public void setViewer(Viewer v) + { super.setViewer(v); if (!dontCascade) cascadeViewer(); - } - + } + /** * Return the shell. If not set locally, queries it from the submenu, which is where it is set by the RSE framework */ @@ -343,7 +347,7 @@ public abstract class SystemBaseSubMenuAction else return null; } - + /** * Special method called by our submenu manager when from its setInputs method. No need to * cascade as the menu manager will do it for us. @@ -352,9 +356,9 @@ public abstract class SystemBaseSubMenuAction { dontCascade = true; // so we don't redundantly do cascading. Phil super.setInputs(shell, v, selection); // calls setSelection+Shell+Viewer - dontCascade = false; + dontCascade = false; } - + /** * An optimization for performance reasons that allows all inputs to be set in one call. * Intercept of parent so we can cascade to sub-actions. Note however this won't really ever @@ -370,7 +374,7 @@ public abstract class SystemBaseSubMenuAction issueTraceMessage(" INSIDE SETINPUTS IN BASE ACTION CLASS"); //$NON-NLS-1$ cascadeAllInputs(); } - + /** * Cascade the current selection to all actions */ @@ -391,12 +395,12 @@ public abstract class SystemBaseSubMenuAction { if (actions[idx] instanceof ISystemAction) { - ((ISystemAction)actions[idx]).setSelection(selection); + ((ISystemAction)actions[idx]).setSelection(selection); } } */ } - + /** * Cascade the current shell to all actions */ @@ -411,7 +415,7 @@ public abstract class SystemBaseSubMenuAction /* IAction[] items = subMenu.getActions(); for (int idx=0; idx @@ -137,16 +140,16 @@ public abstract class SystemRemoteResourceDialog extends SystemPromptDialog * Further, if you turn this on, it has the side effect of allowing the user * to select any remote object. The assumption being if you are prompting for * files, you also want to allow the user to select a folder, with the meaning - * being that all files within the folder are implicitly selected. + * being that all files within the folder are implicitly selected. * * @see #getSelectedObjects() */ public void setMultipleSelectionMode(boolean multiple) { _multipleSelectionMode = multiple; - + } - + /** * Set the message shown at the top of the form */ @@ -169,7 +172,7 @@ public abstract class SystemRemoteResourceDialog extends SystemPromptDialog _form.setSelectionTreeToolTipText(tip); } } - + /** * Show the property sheet on the right hand side, to show the properties of the * selected object. @@ -187,7 +190,7 @@ public abstract class SystemRemoteResourceDialog extends SystemPromptDialog * selected object. *

* This overload shows a Details>>> button so the user can decide if they want to see the - * property sheet. + * property sheet. *

* @param show True if show the property sheet within the dialog * @param initialState True if the property is to be initially displayed, false if it is not @@ -201,10 +204,10 @@ public abstract class SystemRemoteResourceDialog extends SystemPromptDialog setShowDetailsButton(true, !initialState); } } - + /** * Return selected file or folder - */ + */ public Object getSelectedObject() { if (getOutputObject() instanceof Object[]) @@ -216,7 +219,7 @@ public abstract class SystemRemoteResourceDialog extends SystemPromptDialog * Return all selected objects. This method will return an array of one * unless you have called setMultipleSelectionMode(true)! * @see #setMultipleSelectionMode(boolean) - */ + */ public Object[] getSelectedObjects() { if (getOutputObject() instanceof Object[]) @@ -226,20 +229,20 @@ public abstract class SystemRemoteResourceDialog extends SystemPromptDialog else return null; } - + public IHost getSelectedConnection() { return _form.getSelectedConnection(); } - + /** - * Private method. + * Private method. *

- * Called when user presses OK button. + * Called when user presses OK button. * Return true to close dialog. * Return false to not close dialog. */ - protected boolean processOK() + protected boolean processOK() { boolean closeDialog = _form.verify(); if (closeDialog) @@ -254,49 +257,54 @@ public abstract class SystemRemoteResourceDialog extends SystemPromptDialog setOutputObject(null); return closeDialog; } - + + /** @since 3.0 */ public void setShowNewConnectionPrompt(boolean showNewConnectionPrompt) { _inputProvider.setAllowNewConnection(showNewConnectionPrompt); } - + /** * Private method. *

- * Called when user presses DETAILS button. + * Called when user presses DETAILS button. *

* Note the text is automatically toggled for us! We need only * do whatever the functionality is that we desire - * + * * @param hideMode the current state of the details toggle, prior to this request. If we return true from * this method, this state and the button text will be toggled. - * + * * @return true if the details state toggle was successful, false if it failed. */ - protected boolean processDetails(boolean hideMode) + protected boolean processDetails(boolean hideMode) { _form.toggleShowPropertySheet(getShell(), getContents()); return true; - } - + } + /** * Returns the system tree + * * @return the system tree + * @since 3.0 */ public ISystemTree getSystemTree() { return _form.getSystemTree(); } - + /** * Indicates whether the page for the form is complete or not. + * * @return true if the page associated with the form is complete + * @since 3.0 */ public boolean isPageComplete() { return _form.isPageComplete(); } - + public abstract SystemActionViewerFilter getViewerFilter(); public abstract String getVerbiage(); public abstract String getTreeTip(); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameSingleDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameSingleDialog.java index d626574b228..ee225a48d62 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameSingleDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemRenameSingleDialog.java @@ -1,15 +1,15 @@ /******************************************************************************** * Copyright (c) 2002, 2008 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is + * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html - * + * * Initial Contributors: * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, + * component that contains this file: David McKnight, Kushal Munir, + * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * + * * Contributors: * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Rupen Mardirossian (IBM) - [208435] When validating name, check for previously used names for multiple renaming instances @@ -61,35 +61,35 @@ import org.eclipse.swt.widgets.Widget; * Dialog for renaming a single resource. Used when only one item selected. *

* This is a re-usable dialog that you can use directly, or via the {@link org.eclipse.rse.internal.ui.actions.SystemCommonRenameAction} - * action. + * action. *

* To use this dialog, you must call setInputObject with a StructuredSelection of the objects to be renamed. - * If those objects adapt to {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter} or + * If those objects adapt to {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter} or * {@link org.eclipse.rse.ui.view.ISystemRemoteElementAdapter}, the dialog will offer built-in error checking. *

* If the input object does not adapt to org.eclipse.rse.ui.view.ISystemRemoteElementAdapter or ISystemViewElementAdapter, then you - * should call {@link #setNameValidator(org.eclipse.rse.ui.validators.ISystemValidator)} to + * should call {@link #setNameValidator(org.eclipse.rse.ui.validators.ISystemValidator)} to * specify a validator that is called to verify the user-typed new name is valid. Further, to show the type value * of the input object, it should implement {@link org.eclipse.rse.ui.dialogs.ISystemTypedObject}. *

* This dialog does not do the actual renames. Rather, it will return the user-typed new name. This is - * queriable via {@link #getNewName()}, after testing that {@link #wasCancelled()} is false. - * + * queriable via {@link #getNewName()}, after testing that {@link #wasCancelled()} is false. + * * @see org.eclipse.rse.internal.ui.actions.SystemCommonRenameAction */ -public class SystemRenameSingleDialog extends SystemPromptDialog - implements +public class SystemRenameSingleDialog extends SystemPromptDialog + implements Runnable { - + public static final boolean COLLISION_MODE = true; - + private Button overwriteRadio; //private Button renameRadio; private boolean overwriteMode = true; - + private Composite renameGroup; - + private Text newName; private String promptLabel; private String promptTip; @@ -98,29 +98,29 @@ public class SystemRenameSingleDialog extends SystemPromptDialog private Label resourceTypePrompt, resourceTypeValue, verbiageLabel, renameLabel; private SystemMessage errorMessage; private ISystemValidator nameValidator; - private ValidatorUniqueString uniqueNameValidator; + private ValidatorUniqueString uniqueNameValidator; private boolean initialized = false; private boolean copyCollisionMode = false; private boolean isRemote = true; private ISystemViewElementAdapter adapter = null; - private Object inputElement = null; + private Object inputElement = null; private String description = null; private List _namesInUse = new ArrayList(); - + /** - * Constructor + * Constructor */ - public SystemRenameSingleDialog(Shell shell) + public SystemRenameSingleDialog(Shell shell) { - this(shell, SystemResources.RESID_RENAME_TITLE); + this(shell, SystemResources.RESID_RENAME_TITLE); String singleTitle = SystemResources.RESID_RENAME_SINGLE_TITLE; if (!singleTitle.startsWith("Missing")) // TODO: remove test after next mri rev //$NON-NLS-1$ - setTitle(singleTitle); + setTitle(singleTitle); } /** * Constructor with a title */ - public SystemRenameSingleDialog(Shell shell, String title) + public SystemRenameSingleDialog(Shell shell, String title) { super(shell, title); @@ -130,38 +130,45 @@ public class SystemRenameSingleDialog extends SystemPromptDialog } /** - * Constructor with an input object and validator + * Constructor with an input object and validator * This constructor is in copy/move dialogs when there is a collision * @param shell The parent dialog * @param copyCollisionMode true if this is being called because of a name collision on a copy or move operation * @param inputObject The object that is being renamed, or on a copy/move the object in the target container which already exists. Used to get the old name and the name validator * @param nameValidator The name validator to use. Can be null, in which case it is queried from the adapter of the input object */ - public SystemRenameSingleDialog(Shell shell, boolean copyCollisionMode, Object inputObject, ISystemValidator nameValidator) + public SystemRenameSingleDialog(Shell shell, boolean copyCollisionMode, Object inputObject, ISystemValidator nameValidator) { this(shell); setInputObject(inputObject); setCopyCollisionMode(copyCollisionMode); setNameValidator(nameValidator); - + } /** - * Constructor with an input object and validator - * This constructor is in copy/move dialogs when there is a collision + * Constructor with an input object and validator This constructor is in + * copy/move dialogs when there is a collision + * * @param shell The parent dialog - * @param copyCollisionMode true if this is being called because of a name collision on a copy or move operation - * @param inputObject The object that is being renamed, or on a copy/move the object in the target container which already exists. Used to get the old name and the name validator - * @param nameValidator The name validator to use. Can be null, in which case it is queried from the adapter of the input object - * @param nameInUse the List of names that have been previously selected for other files that are to be renamed for multiple file renaming. + * @param copyCollisionMode true if this is being called because of a name + * collision on a copy or move operation + * @param inputObject The object that is being renamed, or on a copy/move + * the object in the target container which already exists. Used + * to get the old name and the name validator + * @param nameValidator The name validator to use. Can be null, in which + * case it is queried from the adapter of the input object + * @param nameInUse the List of names that have been previously selected for + * other files that are to be renamed for multiple file renaming. + * @since 3.0 added nameInUse argument */ - public SystemRenameSingleDialog(Shell shell, boolean copyCollisionMode, Object inputObject, ISystemValidator nameValidator, List nameInUse) + public SystemRenameSingleDialog(Shell shell, boolean copyCollisionMode, Object inputObject, ISystemValidator nameValidator, List nameInUse) { this(shell); setInputObject(inputObject); setCopyCollisionMode(copyCollisionMode); setNameValidator(nameValidator); _namesInUse = nameInUse; - + } /** * Set the label and tooltip of the prompt. The default is "New name:" @@ -170,8 +177,8 @@ public class SystemRenameSingleDialog extends SystemPromptDialog { this.promptLabel = label; this.promptTip = tooltip; - } - + } + /** * Indicate this dialog is the result of a copy/move name collision. * Affects the title, verbiage at the top of the dialog, and context help. @@ -195,9 +202,9 @@ public class SystemRenameSingleDialog extends SystemPromptDialog setHelp(RSEUIPlugin.HELPPREFIX+"drns0000"); //$NON-NLS-1$ String singleTitle = SystemResources.RESID_RENAME_SINGLE_TITLE; if (!singleTitle.startsWith("Missing")) // TODO: remove test after next mri rev //$NON-NLS-1$ - setTitle(singleTitle); + setTitle(singleTitle); else - setTitle(SystemResources.RESID_RENAME_TITLE); // older string we know exists + setTitle(SystemResources.RESID_RENAME_TITLE); // older string we know exists } this.copyCollisionMode = copyCollisionMode; } @@ -209,7 +216,7 @@ public class SystemRenameSingleDialog extends SystemPromptDialog { return copyCollisionMode; } - + /** * Set the validator for the new name,as supplied by the adaptor for name checking. @@ -234,7 +241,7 @@ public class SystemRenameSingleDialog extends SystemPromptDialog /** * @see SystemPromptDialog#getInitialFocusControl() */ - protected Control getInitialFocusControl() + protected Control getInitialFocusControl() { //uSystem.out.println("here! " + (newName == null)); return newName; @@ -243,13 +250,13 @@ public class SystemRenameSingleDialog extends SystemPromptDialog /** * @see SystemPromptDialog#createInner(Composite) */ - protected Control createInner(Composite parent) - { + protected Control createInner(Composite parent) + { // Inner composite int nbrColumns = 1; Composite composite = SystemWidgetHelpers.createComposite(parent, nbrColumns); - - Object inputObject = getInputObject(); + + Object inputObject = getInputObject(); if (copyCollisionMode) { @@ -263,14 +270,14 @@ public class SystemRenameSingleDialog extends SystemPromptDialog verbiageLabel = SystemWidgetHelpers.createLabel(composite, description, nbrColumns); SystemWidgetHelpers.createLabel(composite, " ", nbrColumns); //filler //$NON-NLS-1$ } - + if (copyCollisionMode) - { - overwriteRadio = SystemWidgetHelpers.createRadioButton(composite, this, SystemResources.RESID_SIMPLE_RENAME_RADIO_OVERWRITE_LABEL, SystemResources.RESID_SIMPLE_RENAME_RADIO_OVERWRITE_TOOLTIP); + { + overwriteRadio = SystemWidgetHelpers.createRadioButton(composite, this, SystemResources.RESID_SIMPLE_RENAME_RADIO_OVERWRITE_LABEL, SystemResources.RESID_SIMPLE_RENAME_RADIO_OVERWRITE_TOOLTIP); overwriteRadio.setSelection(true); /*renameRadio =*/ SystemWidgetHelpers.createRadioButton(composite, this, SystemResources.RESID_SIMPLE_RENAME_RADIO_RENAME_LABEL, SystemResources.RESID_SIMPLE_RENAME_RADIO_RENAME_TOOLTIP); } - + int nbrRenameColumns = 2; // BEGIN RENAME renameGroup = SystemWidgetHelpers.createComposite(composite, nbrRenameColumns); @@ -279,37 +286,37 @@ public class SystemRenameSingleDialog extends SystemPromptDialog resourceTypePrompt = SystemWidgetHelpers.createLabel(renameGroup, SystemResources.RESID_SIMPLE_RENAME_RESOURCEPROMPT_LABEL); resourceTypeValue = SystemWidgetHelpers.createLabel(renameGroup, ""); //$NON-NLS-1$ resourceTypeValue.setToolTipText(SystemResources.RESID_SIMPLE_RENAME_RESOURCEPROMPT_TOOLTIP); - + // PROMPT if (promptLabel == null) - { + { String labelText = copyCollisionMode ? SystemResources.RESID_COLLISION_RENAME_LABEL : SystemResources.RESID_SIMPLE_RENAME_PROMPT_LABEL; labelText = SystemWidgetHelpers.appendColon(labelText); renameLabel = SystemWidgetHelpers.createLabel(renameGroup, labelText); } else - { + { renameLabel = SystemWidgetHelpers.createLabel(renameGroup, promptLabel); - } + } newName = SystemWidgetHelpers.createTextField(renameGroup, null); ((GridData)newName.getLayoutData()).widthHint = 300; // make this wider than usual so error messages are not truncated if (promptTip != null) { newName.setToolTipText(promptTip); } - + // END RENAME - - - + + + if (inputObject != null) { initializeInput(); } - + // init ok to disabled, until they type a new name setPageComplete(false); - + // add keystroke listeners... newName.addModifyListener( new ModifyListener() { @@ -317,17 +324,17 @@ public class SystemRenameSingleDialog extends SystemPromptDialog validateNameInput(); } } - ); - + ); + if (copyCollisionMode) { enableRename(false); } - - + + return composite; } - + /** * Override of parent. Must pass selected object onto the form for initializing fields. @@ -342,7 +349,7 @@ public class SystemRenameSingleDialog extends SystemPromptDialog initializeInput(); } } - + private void initializeInput() { if (!initialized) @@ -354,18 +361,18 @@ public class SystemRenameSingleDialog extends SystemPromptDialog else if (inputElement instanceof ISystemTypedObject) inputName = ((ISystemTypedObject)inputElement).getName(); else if (inputElement instanceof IResource) - inputName = ((IResource)inputElement).getName(); + inputName = ((IResource)inputElement).getName(); else if (inputElement instanceof String) - inputName = (String)inputElement; - newName.setText(inputName); + inputName = (String)inputElement; + newName.setText(inputName); if (copyCollisionMode) { verbiageLabel.setText(SystemMessage.sub(SystemResources.RESID_COLLISION_RENAME_VERBIAGE, "&1", inputName)); //$NON-NLS-1$ } - - - + + + if ((nameValidator == null) && (adapter != null)) nameValidator = adapter.getNameValidator(inputElement); if (nameValidator != null) @@ -393,7 +400,7 @@ public class SystemRenameSingleDialog extends SystemPromptDialog if (adapter != null) resourceTypeValue.setText(adapter.getType(inputElement)); else if (inputElement instanceof ISystemTypedObject) - resourceTypeValue.setText(((ISystemTypedObject)inputElement).getType()); + resourceTypeValue.setText(((ISystemTypedObject)inputElement).getType()); else if (inputElement instanceof IResource) { if ((inputElement instanceof IFolder) || (inputElement instanceof IProject)) @@ -401,21 +408,21 @@ public class SystemRenameSingleDialog extends SystemPromptDialog else resourceTypeValue.setText(SystemViewResources.RESID_PROPERTY_FILE_TYPE_FILE_VALUE); } - initialized = true; + initialized = true; } } - + /** * Runnable method */ public void run() { - uniqueNameValidator = getUniqueNameValidator(inputElement, nameValidator); + uniqueNameValidator = getUniqueNameValidator(inputElement, nameValidator); } - + /** * Given an input element and externally-suppplied name validator for it, determine if we - * need to augment that validator with one that will check for uniqueness, and if so + * need to augment that validator with one that will check for uniqueness, and if so * create and return that uniqueness validator */ protected ValidatorUniqueString getUniqueNameValidator(Object inputElement, ISystemValidator nameValidator) @@ -438,12 +445,12 @@ public class SystemRenameSingleDialog extends SystemPromptDialog { // Set the busy cursor to all shells. super.setBusyCursor(true); - try { + try { Shell shell = getShell(); - IRunnableContext irc = RSEUIPlugin.getTheSystemRegistryUI().getRunnableContext(); + IRunnableContext irc = RSEUIPlugin.getTheSystemRegistryUI().getRunnableContext(); RSEUIPlugin.getTheSystemRegistryUI().clearRunnableContext(); names = ra.getRemoteParentNamesInUse(inputElement, null); - RSEUIPlugin.getTheSystemRegistryUI().setRunnableContext(shell, irc); + RSEUIPlugin.getTheSystemRegistryUI().setRunnableContext(shell, irc); } catch (Exception exc) {SystemBasePlugin.logError("Exception getting parent's child names in rename dialog",exc);} //$NON-NLS-1$ if ((names != null) && (names.length>0)) { @@ -460,18 +467,18 @@ public class SystemRenameSingleDialog extends SystemPromptDialog // Restore cursor super.setBusyCursor(false); } - } + } else - isRemote = false; + isRemote = false; newName.setFocus(); return uniqueNameValidator; } - + /** * Returns the selected element given the current input, which is * an IStructuredSelection. */ - protected Object getInputElement(Object inputObject) + protected Object getInputElement(Object inputObject) { if (inputObject instanceof IStructuredSelection) { @@ -481,14 +488,14 @@ public class SystemRenameSingleDialog extends SystemPromptDialog { inputObject = ((SystemSimpleContentElement)inputObject).getData(); } - return inputObject; - } + return inputObject; + } /** * Returns the implementation of ISystemViewElement for the given * object. Returns null if the adapter is not defined or the * object is not adaptable. */ - protected ISystemViewElementAdapter getViewAdapter(Object o) + protected ISystemViewElementAdapter getViewAdapter(Object o) { return SystemAdapterHelpers.getViewAdapter(o); } @@ -496,17 +503,17 @@ public class SystemRenameSingleDialog extends SystemPromptDialog * Returns the implementation of ISystemRemoteElement for the given * object. Returns null if this object does not adaptable to this. */ - protected ISystemRemoteElementAdapter getRemoteAdapter(Object o) + protected ISystemRemoteElementAdapter getRemoteAdapter(Object o) { return SystemAdapterHelpers.getRemoteAdapter(o); - } + } /** - * Called when user presses OK button. + * Called when user presses OK button. * Return true to close dialog. * Return false to not close dialog. */ - protected boolean processOK() + protected boolean processOK() { newNameString = newName.getText(); if (!isRemote) @@ -528,7 +535,7 @@ public class SystemRenameSingleDialog extends SystemPromptDialog setOutputObject(newNameString); } return closeDialog; - } + } /** * Trim leading blanks */ @@ -536,19 +543,19 @@ public class SystemRenameSingleDialog extends SystemPromptDialog { return ("."+text).trim().substring(1); //$NON-NLS-1$ } - + /** * Verifies all input. * @return true if there are no errors in the user input */ - public boolean verify() + public boolean verify() { if (copyCollisionMode && overwriteMode) return true; - + SystemMessage errMsg = null; Control controlInError = null; - clearErrorMessage(); + clearErrorMessage(); errMsg = validateNameInput(newNameString); if (errMsg != null) { controlInError = newName; @@ -559,7 +566,7 @@ public class SystemRenameSingleDialog extends SystemPromptDialog } return (errMsg == null); } - + /** * If renaming a remote object, which is listed in a tree view under an expanded filter, * this tests to see if the rename will cause that object to suddenly not meet the filtering @@ -572,7 +579,7 @@ public class SystemRenameSingleDialog extends SystemPromptDialog // after breaking my pick on this, I have decide it simply is too much work, and // too error-prone, to do. The reason is that we really cannot accurately determine // if the new name will meet the criteria of the filter, short of re-resolving the - // filter and looking for the new name. That is just too expensive, I think. Phil. + // filter and looking for the new name. That is just too expensive, I think. Phil. // See defect 42094. return false; /* @@ -596,28 +603,28 @@ public class SystemRenameSingleDialog extends SystemPromptDialog return ok; */ } - + /** * Called directly as user types. */ - protected SystemMessage validateNameInput() - { + protected SystemMessage validateNameInput() + { newNameString = newName.getText(); if (!isRemote) newNameString = newNameString.trim(); else newNameString = trimTrailing(newNameString); // defect 43173 - + return validateNameInput(newNameString); - } + } /** * Called directly from verify. */ - protected SystemMessage validateNameInput(String theNewName) - { + protected SystemMessage validateNameInput(String theNewName) + { errorMessage= null; - + if (theNewName == null) { errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_EMPTY); @@ -625,7 +632,7 @@ public class SystemRenameSingleDialog extends SystemPromptDialog else { if (nameValidator != null) - errorMessage= nameValidator.validate(theNewName); + errorMessage= nameValidator.validate(theNewName); else if (theNewName.length() == 0) errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_EMPTY); if (errorMessage == null) @@ -634,7 +641,7 @@ public class SystemRenameSingleDialog extends SystemPromptDialog errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_RENAME_OLDEQUALSNEW).makeSubstitution(inputName); } } - + if ((errorMessage == null) && (uniqueNameValidator != null)) errorMessage = uniqueNameValidator.validate(theNewName); if(_namesInUse != null && _namesInUse.size()>0) @@ -651,10 +658,10 @@ public class SystemRenameSingleDialog extends SystemPromptDialog setErrorMessage(errorMessage); else clearErrorMessage(); - setPageComplete(); - return errorMessage; - } - + setPageComplete(); + return errorMessage; + } + /** * This method can be called by the dialog or wizard page host, to decide whether to enable * or disable the next, final or ok buttons. It returns true if the minimal information is @@ -663,13 +670,13 @@ public class SystemRenameSingleDialog extends SystemPromptDialog public boolean isPageComplete() { boolean pageComplete = false; - + if (copyCollisionMode && overwriteMode) { return true; } - - + + if (errorMessage == null) { String theNewName = newName.getText().trim(); @@ -678,12 +685,12 @@ public class SystemRenameSingleDialog extends SystemPromptDialog { pageComplete = !adapter.namesAreEqual(inputElement, theNewName); //System.out.println("back from namesAreEqual: " + pageComplete); - + } } return pageComplete; } - + /** * Inform caller of page-complete status of this form */ @@ -698,7 +705,7 @@ public class SystemRenameSingleDialog extends SystemPromptDialog public String getNewName() { return newNameString; - } + } /** * Returns the user-entered new name as an array for convenience to ISystemRenameTarget hosts. @@ -708,40 +715,40 @@ public class SystemRenameSingleDialog extends SystemPromptDialog String[] newNames = new String[1]; newNames[0] = newNameString; return newNames; - } - + } + public void setDescription(String description) { - this.description = description; + this.description = description; } - + public String getDescription() { - return this.description; + return this.description; } - + public void handleEvent(Event e) { Widget source = e.widget; if (source == overwriteRadio) { - enableRename(!overwriteRadio.getSelection()); + enableRename(!overwriteRadio.getSelection()); } } - + private void enableRename(boolean flag) { if (newName != null) - { + { renameLabel.setEnabled(flag); newName.setEnabled(flag); - + resourceTypePrompt.setEnabled(flag); resourceTypeValue.setEnabled(flag); - + overwriteMode = !flag; setPageComplete(); - + } } } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectAnythingDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectAnythingDialog.java index 60aa9c0ba06..0e2ed8ea925 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectAnythingDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/dialogs/SystemSelectAnythingDialog.java @@ -1,15 +1,15 @@ /******************************************************************************** * Copyright (c) 2002, 2008 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is + * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html - * + * * Initial Contributors: * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, + * component that contains this file: David McKnight, Kushal Munir, + * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * + * * Contributors: * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core @@ -33,72 +33,75 @@ import org.eclipse.swt.widgets.Shell; -public class SystemSelectAnythingDialog extends SystemPromptDialog +public class SystemSelectAnythingDialog extends SystemPromptDialog implements ISelectionChangedListener { private SystemViewForm _view = null; private Object _selected = null; private SystemActionViewerFilter _filter = null; - + public SystemSelectAnythingDialog(Shell shell, String title) { super(shell, title); } - + public Control createInner(Composite parent) { - - _view = new SystemViewForm(getShell(), parent, SWT.NONE, getInputProvider(), true, this); - _view.getSystemTree().addSelectionChangedListener(this); - + + _view = new SystemViewForm(getShell(), parent, SWT.NONE, getInputProvider(), true, this); + _view.getSystemTree().addSelectionChangedListener(this); + if (_filter != null){ _view.getSystemTree().addFilter(_filter); } - + return _view.getTreeControl(); } - + public boolean close() { _view.removeSelectionChangedListener(this); _view.dispose(); return super.close(); } - - /** + + /** * Returns the initial input provider for the viewer. * Tries to deduce the appropriate input provider based on current input. */ - protected ISystemViewInputProvider getInputProvider() + protected ISystemViewInputProvider getInputProvider() { ISystemViewInputProvider inputProvider = RSECorePlugin.getTheSystemRegistry(); - + return inputProvider; } - + public Control getInitialFocusControl() { return _view.getTreeControl(); } - + public Object getSelectedObject() { //IStructuredSelection selection = (IStructuredSelection)_view.getSelection(); //return selection.getFirstElement(); return _selected; } - + public void selectionChanged(SelectionChangedEvent e) { IStructuredSelection selection = (IStructuredSelection)e.getSelection(); - - _selected = selection.getFirstElement(); + + _selected = selection.getFirstElement(); } + /** - * Use this method to limit the objects that are seen in the view of this dialog. - * - * @param filter the filter that limits the visible objects + * Use this method to limit the objects that are seen in the view of this + * dialog. + * + * @param filter the filter that limits the visible objects + * @since 3.0 */ public void setViewerFilter(SystemActionViewerFilter filter) { diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterPoolWizardInterface.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterPoolWizardInterface.java index f9392c3e413..9369fe32c30 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterPoolWizardInterface.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemFilterPoolWizardInterface.java @@ -7,10 +7,10 @@ * * Initial Contributors: * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, + * component that contains this file: David McKnight, Kushal Munir, + * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * + * * Contributors: * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types *******************************************************************************/ @@ -21,8 +21,10 @@ import org.eclipse.rse.ui.wizards.ISystemWizard; /** * An interface for filter pool wizards to implement + * + * @since 3.0 moved from "internal" to API */ -public interface SystemFilterPoolWizardInterface +public interface SystemFilterPoolWizardInterface extends ISystemWizard, SystemFilterPoolDialogInterface { } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizard.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizard.java index 3734f014985..fbe3974a35a 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizard.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizard.java @@ -7,10 +7,10 @@ * * Initial Contributors: * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, + * component that contains this file: David McKnight, Kushal Munir, + * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * + * * Contributors: * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin * David Dykstal (IBM) - [222270] clean up interfaces in org.eclipse.rse.core.filters @@ -55,7 +55,7 @@ import org.eclipse.swt.widgets.Shell; * Base Wizard for users to define a new system filter. * While subsystem providers are free to offer their own wizards, this * abstracts out much of it and makes it easy to simply override and - * supply a couple classes to offer a totally unique presentation to the + * supply a couple classes to offer a totally unique presentation to the * user. *

* Some guiding design rules for this wizard: @@ -65,7 +65,7 @@ import org.eclipse.swt.widgets.Shell; * is created, only after via the change action. The wizard basically * prompts for the creation of a single new filter string. *

  • Users are confused about "naming" a filter, so the name is not asked - * for until the second page, and it is possible for subclasses to + * for until the second page, and it is possible for subclasses to * default that name to something intelligent based on the contents of * the first page, such that users can press Finish and not think about * the name. @@ -74,12 +74,12 @@ import org.eclipse.swt.widgets.Shell; * While this class can be subclassed, you should find all attributes can be * configured via setters. */ -public class SystemNewFilterWizard - extends AbstractSystemWizard +public class SystemNewFilterWizard + extends AbstractSystemWizard { - protected SystemNewFilterWizardMainPage mainPage; - private SystemNewFilterWizardNamePage namePage; - protected SystemNewFilterWizardInfoPage infoPage; + protected SystemNewFilterWizardMainPage mainPage; + private SystemNewFilterWizardNamePage namePage; + protected SystemNewFilterWizardInfoPage infoPage; protected ISystemFilterContainer filterContainer; protected ISystemFilterPool parentPool; protected ISystemFilterPool[] poolsToSelectFrom; @@ -93,13 +93,13 @@ public class SystemNewFilterWizard protected boolean fromRSE = false; protected boolean page1DescriptionSet = false; protected ISystemFilter newFilter = null; - protected SystemFilterStringEditPane editPane; + protected SystemFilterStringEditPane editPane; protected ISystemFilterPoolReferenceManagerProvider provider; protected ISystemFilterPoolWrapperInformation poolWrapperInformation; - protected ISystemFilterPoolSelectionValidator filterPoolSelectionValidator; + protected ISystemFilterPoolSelectionValidator filterPoolSelectionValidator; protected ISystemNewFilterWizardConfigurator configurator; - + /** * Constructor when you want to supply your own title and image * @param title - title to show for this wizard. This is used as the page title! The title is always "New"! @@ -111,16 +111,16 @@ public class SystemNewFilterWizard this(new SystemNewFilterWizardConfigurator(title), wizardImage, parentPool); } /** - * Constructor when you want to use the default page title and image, or want to + * Constructor when you want to use the default page title and image, or want to * supply it via setWizardTitle and setWizardImage. * @param parentPool - the filter pool we are to create this filter in. - */ + */ public SystemNewFilterWizard(ISystemFilterPool parentPool) { this(new SystemNewFilterWizardConfigurator(), RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWFILTERWIZARD_ID), - parentPool); - } + parentPool); + } /** * Constructor when you want to supply all your own configuration data * @param data - configuration data @@ -137,36 +137,36 @@ public class SystemNewFilterWizard setOutputObject(null); } - // ----------------------------------- + // ----------------------------------- // INPUT/CONFIGURATION METHODS... // ----------------------------------- /** - * If you want to prompt the user for the parent filter pool to create this filter in, + * If you want to prompt the user for the parent filter pool to create this filter in, * call this with the list of filter pools. In this case, the filter pool passed into * the constructor will be used as the initial selection. */ public void setAllowFilterPoolSelection(ISystemFilterPool[] poolsToSelectFrom) { this.poolsToSelectFrom = poolsToSelectFrom; - } + } /** * This is an alternative to {@link #setAllowFilterPoolSelection(ISystemFilterPool[])} *

    - * If you want to prompt the user for the parent filter pool to create this filter in, + * If you want to prompt the user for the parent filter pool to create this filter in, * but want to not use the term "pool" say, you can use an array of euphamisms. That is, - * you can pass an array of objects that map to filter pools, but have a different + * you can pass an array of objects that map to filter pools, but have a different * display name that is shown in the dropdown. *

    * Of course, if you want to do this, then you will likely want to offer a different - * label and tooltip for the prompt, and different verbiage above the prompt. The + * label and tooltip for the prompt, and different verbiage above the prompt. The * object this method accepts as a parameter encapsulates all that information, and * there is a default class you can use for this. */ public void setAllowFilterPoolSelection(ISystemFilterPoolWrapperInformation poolsToSelectFrom) { this.poolWrapperInformation = poolsToSelectFrom; - } + } /** * Set the type of filter we are creating. Results in a call to setType on the new filter. * Types are not used by the base filter framework but are a way for tools to create typed @@ -192,7 +192,7 @@ public class SystemNewFilterWizard showFilterStrings = show; } /** - * Call in order to not prompt the user for a filter name. This also implies we will not + * Call in order to not prompt the user for a filter name. This also implies we will not * be prompting for a parent filter pool! Default is true. *

    * This is used when creating temporary filters that won't be saved. In this case, on @@ -231,7 +231,7 @@ public class SystemNewFilterWizard this.defaultFilterStrings = defaultFilterStrings; } /** - * Set if we are creating a filter for use in the RSE or not. This affects the + * Set if we are creating a filter for use in the RSE or not. This affects the * tips and help. *

    * This is set to true automatically by the subsystem factory base class in the RSE, @@ -247,19 +247,19 @@ public class SystemNewFilterWizard */ public void setFilterPoolSelectionValidator(ISystemFilterPoolSelectionValidator validator) { - this.filterPoolSelectionValidator = validator; - } + this.filterPoolSelectionValidator = validator; + } /** * Set the contextual system filter pool reference manager provider. Eg, in the RSE, this * will be the selected subsystem if the New Filter action is launched from there, or if * launched from a filter pool reference under there. *

    - * Will be non-null if the current selection is a reference to a filter pool or filter, - * or a reference manager provider. + * Will be non-null if the current selection is a reference to a filter pool or filter, + * or a reference manager provider. *

    * This is passed into the filter and filter string wizards and dialogs in case it is needed - * for context. + * for context. */ public void setSystemFilterPoolReferenceManagerProvider(ISystemFilterPoolReferenceManagerProvider provider) { @@ -287,7 +287,7 @@ public class SystemNewFilterWizard { super.setWizardPageTitle(pageTitle); if (configurator instanceof SystemNewFilterWizardConfigurator) - ((SystemNewFilterWizardConfigurator)configurator).setPageTitle(pageTitle); + ((SystemNewFilterWizardConfigurator)configurator).setPageTitle(pageTitle); } /** * Set the description to display on the first page of the wizard @@ -298,7 +298,7 @@ public class SystemNewFilterWizard ((SystemNewFilterWizardConfigurator)configurator).setPage1Description(description); page1DescriptionSet = true; } - + /** * Specify an edit pane that prompts the user for the contents of a filter string. */ @@ -307,15 +307,15 @@ public class SystemNewFilterWizard this.editPane = editPane; } - // ----------------------------------- + // ----------------------------------- // INTERNAL BUT OVERRIDABLE METHODS... // ----------------------------------- /** * Extendable point for child classes. You don't need to override typically though... rather - * you can simply supply your own filter string edit pane. + * you can simply supply your own filter string edit pane. *

    * By default, this page uses the wizard page title as set in setWizardPageTitle(...) or the constructor. - * @return the primary page prompting for a single filter string. + * @return the primary page prompting for a single filter string. */ protected SystemNewFilterWizardMainPage createMainPage() { @@ -327,8 +327,12 @@ public class SystemNewFilterWizard return mainPage; } /** - * By default, this page uses the wizard page title as set in setWizardPageTitle(...) or the constructor. - * @return the wizard page prompting for the filter name and parent filter pool + * By default, this page uses the wizard page title as set in + * setWizardPageTitle(...) or the constructor. + * + * @return the wizard page prompting for the filter name and parent filter + * pool + * @since 3.0 moved SystemNewFilterWizardNamePage from internal to API */ protected SystemNewFilterWizardNamePage createNamePage() { @@ -346,17 +350,17 @@ public class SystemNewFilterWizard boolean showFilterPoolsTip = ((poolsToSelectFrom != null) || (poolWrapperInformation != null)); infoPage = new SystemNewFilterWizardInfoPage(this, showFilterPoolsTip, configurator); return infoPage; - } + } /** * Override of parent to do nothing */ public void addPages() {} - + /** - * Creates the wizard pages. + * Creates the wizard pages. * This method is an override from the parent Wizard class. */ - public void createPageControls(Composite c) + public void createPageControls(Composite c) { try { // MAIN PAGE... @@ -381,7 +385,7 @@ public class SystemNewFilterWizard ISystemValidator[] validators = new ISystemValidator[poolsToSelectFrom.length]; for (int idx=0; idx create if not found @@ -500,7 +504,7 @@ public class SystemNewFilterWizard newFilter = createNewFilter(getShell(), filterParent, filterName, filterStrings, type); if (newFilter == null) return false; /* - * We allow users to select a profile to create their filter in. From this we + * We allow users to select a profile to create their filter in. From this we * select the default filter pool for the particular subsystem in that profile. * It is possible for the user to pick a profile that this subsystem does not yet reference. * To solve this we need to add a reference for them. This is only a possibility when called @@ -538,7 +542,7 @@ public class SystemNewFilterWizard } } ok = (newFilter != null); - } // end if showNamePrompt + } // end if showNamePrompt else { ok = true; setOutputObject(filterStrings); @@ -547,7 +551,7 @@ public class SystemNewFilterWizard } return false; } - + /** * Return the parent into which we are creating a filter. If filterContainer has been set, * returns that, else returns getInputObject() which is set by the calling action. @@ -564,7 +568,7 @@ public class SystemNewFilterWizard */ protected ISystemFilterContainer getFilterContainer() { - //System.out.println("Old. inside getFilterContainer. " + filterContainer + ", " + getInputObject()); + //System.out.println("Old. inside getFilterContainer. " + filterContainer + ", " + getInputObject()); if (filterContainer == null) { @@ -583,9 +587,9 @@ public class SystemNewFilterWizard else if (input instanceof ISystemFilterContainer) return (ISystemFilterContainer)input; else if (input instanceof ISystemFilterContainerReference) - return ((ISystemFilterContainerReference)input).getReferencedSystemFilterContainer(); + return ((ISystemFilterContainerReference)input).getReferencedSystemFilterContainer(); else if (input instanceof ISystemFilterPoolReference) - return ((ISystemFilterPoolReference)input).getReferencedFilterPool(); + return ((ISystemFilterPoolReference)input).getReferencedFilterPool(); else if (parentPool != null) return parentPool; else if ((poolsToSelectFrom != null) && (poolsToSelectFrom.length>0)) @@ -615,7 +619,7 @@ public class SystemNewFilterWizard { this.filterContainer = containerRef.getReferencedSystemFilterContainer(); } - + /** * Extendable point for child classes. * Override to create unique SystemFilter object. @@ -637,7 +641,7 @@ public class SystemNewFilterWizard newFilter = fpMgr.createSystemFilter(filterParent, aliasName, filterStringsVector, type); return newFilter; } - + // ----------------------- // CALLBACKS FROM PAGES... // ----------------------- @@ -649,7 +653,7 @@ public class SystemNewFilterWizard return fromRSE; } /** - * For page 2 of the New Filter wizard, if it is possible to + * For page 2 of the New Filter wizard, if it is possible to * deduce a reasonable default name from the user input here, * then return it here. Else, just return null. * @@ -658,7 +662,7 @@ public class SystemNewFilterWizard public String getDefaultFilterName() { return mainPage.getEditPane(null).getDefaultFilterName(); - } + } // ------ // OUTPUT // ------ diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java index d2af39f3c47..68e4e325c73 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java @@ -7,10 +7,10 @@ * * Initial Contributors: * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, + * component that contains this file: David McKnight, Kushal Munir, + * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * + * * Contributors: * David Dykstal (IBM) - [160403] filters should be connection private by default * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types @@ -42,16 +42,18 @@ import org.eclipse.swt.widgets.Text; /** * Second page of the New Filter wizard that prompts for the name of the filter. + * + * @since 3.0 moved from internal to API */ -public class SystemNewFilterWizardNamePage +public class SystemNewFilterWizardNamePage extends AbstractSystemWizardPage implements SelectionListener { - + protected Text nameText; protected Button uniqueCB; protected Label poolVerbiage; - protected Label poolComboLabel; + protected Label poolComboLabel; protected Combo poolWrapperCombo; protected Combo poolCombo; protected SystemMessage errorMessage; @@ -66,8 +68,8 @@ public class SystemNewFilterWizardNamePage protected ISystemFilterPoolWrapper[] poolWrappers = null; protected ISystemFilterPoolWrapperInformation poolWrapperInformation; protected ISystemFilterPool parentPool = null; - private ISystemNewFilterWizardConfigurator configurator; - + private ISystemNewFilterWizardConfigurator configurator; + /** * Constructor. */ @@ -106,42 +108,42 @@ public class SystemNewFilterWizardNamePage { this.poolsToSelectFrom = poolsToSelectFrom; this.nameValidators = nameValidators; - if ((poolsToSelectFrom != null) && (poolsToSelectFrom.length>0)) + if ((poolsToSelectFrom != null) && (poolsToSelectFrom.length>0)) { - if (parentPool == null) + if (parentPool == null) parentPool = poolsToSelectFrom[0]; } - } + } /** * This is an alternative to {@link #setAllowFilterPoolSelection(ISystemFilterPool[], ISystemValidator[])} *

    - * If you want to prompt the user for the parent filter pool to create this filter in, + * If you want to prompt the user for the parent filter pool to create this filter in, * but want to not use the term "pool" say, you can use an array of euphamisms. That is, - * you can pass an array of objects that map to filter pools, but have a different + * you can pass an array of objects that map to filter pools, but have a different * display name that is shown in the dropdown. *

    * Of course, if you want to do this, then you will likely want to offer a different - * label and tooltip for the prompt, and different verbiage above the prompt. The + * label and tooltip for the prompt, and different verbiage above the prompt. The * object this method accepts as a parameter encapsulates all that information, and * there is a default class you can use for this. */ public void setAllowFilterPoolSelection(ISystemFilterPoolWrapperInformation poolWrappersToSelectFrom, - ISystemValidator[] nameValidators) + ISystemValidator[] nameValidators) { this.poolWrapperInformation = poolWrappersToSelectFrom; this.nameValidators = nameValidators; - if (parentPool == null) + if (parentPool == null) parentPool = poolWrappersToSelectFrom.getPreSelectWrapper().getSystemFilterPool(); - } + } /** * Set the validator to call when the user selects a filter pool. Optional. */ public void setFilterPoolSelectionValidator(ISystemFilterPoolSelectionValidator validator) { - filterPoolSelectionValidator = validator; + filterPoolSelectionValidator = validator; //System.out.println("Inside setFilterPoolSelectionValidator. Non null? " + (validator != null)); } - + // --------------------------------- // LIFECYCLE METHODS... // --------------------------------- @@ -154,13 +156,13 @@ public class SystemNewFilterWizardNamePage int nbrColumns = 2; Composite composite_prompts = SystemWidgetHelpers.createComposite(parent, nbrColumns); - + SystemWidgetHelpers.createVerbiage(composite_prompts, configurator.getPage2NameVerbiage(), nbrColumns, false, 200); nameText = SystemWidgetHelpers.createLabeledTextField(composite_prompts, null, configurator.getPage2NamePromptLabel(), configurator.getPage2NamePromptTooltip()); - + addSeparatorLine(composite_prompts, nbrColumns); addFillerLine(composite_prompts, nbrColumns); - + // allow the user to create this filter uniquely for this connection, which means putting it in a // special filter pool we will create, just for this connection. This option is not shown if we are // already told which filter pool to create the filter in, such as in Show Filter Pools mode, when @@ -169,13 +171,13 @@ public class SystemNewFilterWizardNamePage if ((poolsToSelectFrom!=null) || (poolWrapperInformation!=null)) { uniqueCB = SystemWidgetHelpers.createCheckBox(composite_prompts, nbrColumns, configurator.getPage2UniqueToConnectionLabel(), null); - uniqueCB.setToolTipText(configurator.getPage2UniqueToConnectionToolTip()); + uniqueCB.setToolTipText(configurator.getPage2UniqueToConnectionToolTip()); uniqueCB.addSelectionListener(this); uniqueCB.setSelection(true); // [160403] filters should be connection private by default } - + addFillerLine(composite_prompts, nbrColumns); - + if (poolsToSelectFrom != null) { poolVerbiage = SystemWidgetHelpers.createVerbiage(composite_prompts, configurator.getPage2PoolVerbiage(), nbrColumns, false, 200); @@ -193,7 +195,7 @@ public class SystemNewFilterWizardNamePage } if ((nameValidator == null) && (nameValidators!=null)) nameValidator = nameValidators[filterPoolSelectionIndex]; - poolCombo.setItems(poolNames); + poolCombo.setItems(poolNames); poolCombo.select(filterPoolSelectionIndex); poolCombo.addSelectionListener(this); if ((uniqueCB!=null) && uniqueCB.getSelection()) @@ -220,7 +222,7 @@ public class SystemNewFilterWizardNamePage } if ((nameValidator == null) && (nameValidators!=null)) nameValidator = nameValidators[filterPoolSelectionIndex]; - poolWrapperCombo.setItems(poolNames); + poolWrapperCombo.setItems(poolNames); poolWrapperCombo.select(filterPoolSelectionIndex); poolWrapperCombo.addSelectionListener(this); if ((uniqueCB!=null) && uniqueCB.getSelection()) @@ -230,7 +232,7 @@ public class SystemNewFilterWizardNamePage poolWrapperCombo.setEnabled(false); } } - + // initialize inputs if (nameValidator != null) { @@ -240,7 +242,7 @@ public class SystemNewFilterWizardNamePage } if (inputFilterName != null) nameText.setText(inputFilterName); - + // add keystroke listeners... nameText.addModifyListener( new ModifyListener() { @@ -251,12 +253,12 @@ public class SystemNewFilterWizardNamePage validateNameInput(); } } - ); - - setPageComplete(); + ); + + setPageComplete(); contentsCreated = true; return composite_prompts; - } + } /** * Return the Control to be given initial focus. * Override from parent. Return control to be given initial focus. @@ -265,16 +267,16 @@ public class SystemNewFilterWizardNamePage { return nameText; } - + /** - * Completes processing of the wizard. If this - * method returns true, the wizard will close; + * Completes processing of the wizard. If this + * method returns true, the wizard will close; * otherwise, it will stay active. - * This method is an override from the parent Wizard class. + * This method is an override from the parent Wizard class. * * @return whether the wizard finished successfully */ - public boolean performFinish() + public boolean performFinish() { if (!contentsCreated) return true; @@ -292,14 +294,14 @@ public class SystemNewFilterWizardNamePage pageComplete = (nameText.getText().trim().length() > 0); return pageComplete; } - + /** * Inform caller of page-complete status of this page */ public void setPageComplete() { setPageComplete(isPageComplete()); - } + } /** * User has selected something */ @@ -308,13 +310,13 @@ public class SystemNewFilterWizardNamePage Object src = e.getSource(); if (src == poolCombo) { - int selection = poolCombo.getSelectionIndex(); + int selection = poolCombo.getSelectionIndex(); if ((selection >= 0) && (nameValidators!=null)) nameValidator = nameValidators[selection]; } else if (src == poolWrapperCombo) { - int selection = poolWrapperCombo.getSelectionIndex(); + int selection = poolWrapperCombo.getSelectionIndex(); if ((selection >= 0) && (nameValidators!=null)) nameValidator = nameValidators[selection]; } @@ -344,7 +346,7 @@ public class SystemNewFilterWizardNamePage // --------------------------------- /** * Verify all contents - */ + */ public SystemMessage verify() { errorMessage = null; @@ -357,12 +359,12 @@ public class SystemNewFilterWizardNamePage controlInError = poolCombo; else if (poolWrapperCombo != null) controlInError = poolCombo; - } + } if ((errorMessage == null) && (nameValidator != null)) { errorMessage = nameValidator.validate(nameText.getText().trim()); controlInError = nameText; - } + } if (errorMessage != null) { @@ -373,40 +375,40 @@ public class SystemNewFilterWizardNamePage else clearErrorMessage(); return errorMessage; - } + } /** * This hook method is called whenever the text changes in the filter name input field. */ - protected SystemMessage validateNameInput() - { - errorMessage= null; + protected SystemMessage validateNameInput() + { + errorMessage= null; if (nameValidator != null) errorMessage = nameValidator.validate(nameText.getText().trim()); if ((errorMessage == null) && (filterPoolSelectionValidator != null)) errorMessage = filterPoolSelectionValidator.validate(getParentSystemFilterPool()); setPageComplete(); if (errorMessage != null) - setErrorMessage(errorMessage); + setErrorMessage(errorMessage); else clearErrorMessage(); return errorMessage; } - + // --------------------------------- - // METHODS FOR EXTRACTING USER DATA + // METHODS FOR EXTRACTING USER DATA // --------------------------------- /** * Return name of filter * Call this after finish ends successfully. - */ + */ public String getFilterName() { if (nameText != null) return nameText.getText().trim(); else return inputFilterName; - } + } /** * Return the filter pool that was explicitly chosen by the user, * or implicitly set by the caller. @@ -438,8 +440,8 @@ public class SystemNewFilterWizardNamePage pool = parentPool; //System.out.println("Inside getParentSystemFilterPool. returning " + pool.getName()); return pool; - } - + } + /** * Return the user's decision whether to create this filter uniquely * for this connection, or for all applicable connections. @@ -452,7 +454,7 @@ public class SystemNewFilterWizardNamePage return false; } - // ------------------------------- + // ------------------------------- // INTERCEPT OF WIZARDPAGE METHODS // ------------------------------- /** @@ -478,8 +480,8 @@ public class SystemNewFilterWizardNamePage } } - // -------------------------------------------------------------- - // ALL THE MRI ON THIS PAGE IS CONFIGURABLE. CALL HERE TO SET IT. // -------------------------------------------------------------- - + // ALL THE MRI ON THIS PAGE IS CONFIGURABLE. CALL HERE TO SET IT. + // -------------------------------------------------------------- + } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java index 18dcbb4e4b3..0fe735ba133 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/ServicesPropertyPage.java @@ -1,17 +1,17 @@ /******************************************************************************** * Copyright (c) 2006, 2008 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is + * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html - * + * * Initial Contributors: * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, + * component that contains this file: David McKnight, Kushal Munir, + * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * + * * Contributors: - * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType + * Martin Oberhuber (Wind River) - [175262] IHost.getSystemType() should return IRSESystemType * David Dykstal (IBM) - [217556] remove service subsystem types * David Dykstal (IBM) - [231630] add help for services property page ********************************************************************************/ @@ -31,30 +31,30 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; -public abstract class ServicesPropertyPage extends SystemBasePropertyPage +public abstract class ServicesPropertyPage extends SystemBasePropertyPage { protected ServicesForm _form; protected String _hostname; protected IRSESystemType _hosttype; protected ServiceElement _rootElement; - + protected Control createContentArea(Composite parent) { _form = new ServicesForm(parent.getShell(), getMessageLine()); _form.createContents(parent); - + // init services initServices(); SystemWidgetHelpers.setCompositeHelp(parent, "org.eclipse.rse.ui.ServicesPropertyPage"); //$NON-NLS-1$ return parent; } - + protected boolean verifyPageContents() { return _form.verify(); } - + protected void initServices() { ServiceElement[] elements = getServiceElements(); @@ -62,13 +62,17 @@ public abstract class ServicesPropertyPage extends SystemBasePropertyPage _form.init(_rootElement); } + /** + * @since 3.0 returning ISubSystem rather than IServiceSubSystem + * @return + */ protected ISubSystem getServiceSubSystem() { return (ISubSystem)getElement(); } - + protected abstract ServiceElement[] getServiceElements(); - + /** * @since 3.0 */ @@ -87,12 +91,12 @@ public abstract class ServicesPropertyPage extends SystemBasePropertyPage return result; } } - + protected void commitChanges() { _rootElement.commit(); } - + protected void revertChanges() { _rootElement.revert(); @@ -100,10 +104,10 @@ public abstract class ServicesPropertyPage extends SystemBasePropertyPage public boolean applyValues(IConnectorService connectorService) { - FactoryServiceElement selectedService = (FactoryServiceElement)_form.getSelectedService(); + FactoryServiceElement selectedService = (FactoryServiceElement)_form.getSelectedService(); ISubSystemConfiguration factory = selectedService.getFactory(); ISubSystemConfiguration currentFactory = getCurrentSubSystemConfiguration(); - if (factory != currentFactory) + if (factory != currentFactory) { getServiceSubSystem().switchServiceFactory(factory); } @@ -114,17 +118,17 @@ public abstract class ServicesPropertyPage extends SystemBasePropertyPage { _hostname = hostname; } - + public void setSystemType(IRSESystemType systemType) { _hosttype = systemType; } - + public String getHostname() { return _hostname; } - + public IRSESystemType getSystemType() { return _hosttype; diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/IViewLinker.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/IViewLinker.java index 596e0a2f826..c9746f8c218 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/IViewLinker.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/IViewLinker.java @@ -8,7 +8,7 @@ * Initial Contributors: * The following IBM employees contributed to the Remote System Explorer * component that contains this file: David McKnight. - * + * * Contributors: * David McKnight (IBM) - [187711] IViewLinker to be API that system view part calls when link with editor *******************************************************************************/ @@ -17,19 +17,22 @@ package org.eclipse.rse.ui.view; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IWorkbenchPage; +/** + * @since 3.0 + */ public interface IViewLinker { - + /** * System View part calls link when using Link With Editor. Provider of action supplies this implementation. - * @param editor the active editor + * @param editor the active editor * @param systemTree the view to link */ public void linkEditorToView(IEditorPart editor, ISystemTree systemTree); - - + + /** * System View part calls link when using Link With Editor. Provider of action supplies this implementation. - * @param editor the active editor + * @param editor the active editor * @param page the active workbench page */ public void linkViewToEditor(Object remoteObject, IWorkbenchPage page); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapter.java index 2b580e95b60..f200331642f 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SubSystemConfigurationAdapter.java @@ -1,15 +1,15 @@ /******************************************************************************** * Copyright (c) 2006, 2008 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is + * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html - * + * * Initial Contributors: * The following IBM employees contributed to the Remote System Explorer - * component that contains this file: David McKnight, Kushal Munir, - * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, + * component that contains this file: David McKnight, Kushal Munir, + * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. - * + * * Contributors: * Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry @@ -100,9 +100,9 @@ import org.eclipse.ui.dialogs.PropertyPage; public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAdapter, ISystemNewFilterActionConfigurator -{ +{ protected Hashtable imageTable = null; - + // actions stuff... private IAction[] subSystemActions = null; private IAction[] filterPoolActions = null; @@ -111,17 +111,17 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda public SubSystemConfigurationAdapter() { } - - + + /** * Returns any framework-supplied actions remote objects that should be contributed to the popup menu * for the given selection list. This does nothing if this adapter does not implement ISystemRemoteElementAdapter, * else it potentially adds menu items for "User Actions" and Compile", for example. It queries the subsystem * configuration of the selected objects to determine if these actions are appropriate to add. - * + * *

    * No need to override. - * + * * @param menu The menu to contribute actions to * @param selection The window's current selection. * @param shell of viewer calling this. Most dialogs require a shell. @@ -193,6 +193,8 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda * interrogate them for the user-entered data and use it when creating the default subsystem instance. * * Tip: consider extending {@link org.eclipse.rse.ui.wizards.AbstractSystemNewConnectionWizardPage} for your wizard page class. + * + * @since 3.0 ISystemNewConnectionWizardPage moved from Core to UI */ public ISystemNewConnectionWizardPage[] getNewConnectionWizardPages(ISubSystemConfiguration config, IWizard wizard) { @@ -206,14 +208,14 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda // { // List pages = getSubSystemPropertyPages(config); // if (pages != null && pages.size() > 0) -// { +// { // SystemSubSystemsPropertiesWizardPage page = new SystemSubSystemsPropertiesWizardPage(wizard, config, pages); -// return new ISystemNewConnectionWizardPage[] {page}; +// return new ISystemNewConnectionWizardPage[] {page}; // } // } return new ISystemNewConnectionWizardPage[0]; } - + /* * Return the form used in the subsystem property page. This default implementation returns Syste */ @@ -221,8 +223,8 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda { return new SystemSubSystemPropertyPageCoreForm(msgLine, caller); } - - + + // FIXME - UDAs no longer coupled with config in core // // --------------------------------- @@ -238,7 +240,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda // *

    // * Do not override this, as the implementation is complete. However, // * you must override createActionSubSystem. -// * +// * // * @see #supportsUserDefinedActions() // * @see #createActionSubSystem() // */ @@ -257,7 +259,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda // /** // * Overridable method to instantiate the SystemUDActionSubsystem. // * You must override this if you return true to supportsUserActions. -// * +// * // * @see #supportsUserDefinedActions() // * @see #getActionSubSystem(ISubSystem) // */ @@ -278,8 +280,8 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda // SystemUDACascadeAction act = new SystemUDACascadeAction(userActionSubSystem, selection); // menu.add(menuGroup, act); // } - - + + // --------------------------------- // COMPILE ACTIONS METHODS... // --------------------------------- @@ -310,7 +312,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda ImageDescriptor result = adapter.getImageDescriptor(); return result; } - + /* * (non-Javadoc) * @see org.eclipse.rse.ui.subsystems.ISubSystemConfigurationAdapter#getGraphicsImage(org.eclipse.rse.core.subsystems.ISubSystemConfiguration) @@ -382,7 +384,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda // --------------------------------- // SUBSYSTEM METHODS... - // --------------------------------- + // --------------------------------- /** @@ -391,7 +393,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda * Override if additional actions needs to be contributed. *

    * @see #getSubSystemNewFilterPoolActions(SystemMenuManager, IStructuredSelection, Shell, String, ISubSystemConfiguration, ISubSystem) - * + * * @param selectedSubSystem the currently selected subsystem * @param shell The Shell of the view where this action was launched from * @return array of IAction objects to contribute to the popup menu @@ -411,7 +413,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda for (int idx = 0; idx < newFPActions.length; idx++) { // special case handling... - // set input subsystem for new filter pool actions... + // set input subsystem for new filter pool actions... if (newFPActions[idx] instanceof SystemFilterAbstractFilterPoolAction) { SystemFilterAbstractFilterPoolAction fpAction = (SystemFilterAbstractFilterPoolAction) newFPActions[idx]; @@ -449,7 +451,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda } // end if newFilterActions != null } // end if !showFilterPools } // end if supportsFilters() - + // FIXME - UDAs moved out of here // // if user defined actions are supported, add an action to work with them... // if (config.supportsUserDefinedActions()) @@ -461,11 +463,11 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda // if (config.supportsCompileActions()) // childActions.addElement(new SystemWorkWithCompileCommandsAction(shell, false)); - - + + if (config.supportsSubSystemConnect()) { - // MJB: RE defect 40854 + // MJB: RE defect 40854 addConnectOrDisconnectAction(childActions, shell, selectedSubSystem); } @@ -475,7 +477,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda int nbrBaseActions = 0; if (config.supportsSubSystemConnect()) { - //nbrBaseActions += 2; // 4; MJB: RE defect 50854 + //nbrBaseActions += 2; // 4; MJB: RE defect 50854 if (selectedSubSystem.getConnectorService().supportsUserId()) nbrBaseActions += 1; } @@ -485,10 +487,10 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda int ssIdx = 0; if (config.supportsSubSystemConnect()) { - // MJB: RE defect 40854 + // MJB: RE defect 40854 //subSystemActions[ssIdx++] = new SystemConnectAction(shell); //subSystemActions[ssIdx++] = new SystemDisconnectAction(shell); - + if (selectedSubSystem.getConnectorService().supportsUserId()) subSystemActions[ssIdx++] = new SystemClearPasswordAction(shell); } @@ -503,12 +505,12 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda return allActions; } - + /** * Overridable method to add the connect or disconnect action. - * + * * @param actions The list of child actions. Add the connect/disconnect action to this vector is applicable. - * @param shell The shell. + * @param shell The shell. * @param selectedSS The selected subsystem. */ protected void addConnectOrDisconnectAction(Vector actions, Shell shell, ISubSystem selectedSS) @@ -523,11 +525,11 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda actions.addElement(new SystemConnectAction(shell)); } } - + /** * There is a reasonable amount of processing needed to configure filter wizards. To aid * in performance and memory usage, we extract that processing into this method, and then - * use a callback contract with the filter wizard to call us back to do this processing + * use a callback contract with the filter wizard to call us back to do this processing * only at the time the action is actually selected to be run. *

    * The processing we do here is to specify the filter pools to prompt the user for, in the @@ -540,7 +542,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda //System.out.println("Inside configureNewFilterAction! It worked!"); newFilterAction.setFromRSE(true); boolean showFilterPools = config.showFilterPools(); - + // It does not make sense, when invoked from a filterPool, to ask the user // for the parent filter pool, or to ask the user whether the filter is connection // specific, as they user has explicitly chosen their pool... @@ -552,7 +554,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda // For a new user we simply want to ask them whether this filter is to be team sharable or private, // and based on that, we will place the filter in the default filter pool for the appropriate profile. // For an advanced user who has simply turned show filter pools back off, we want to let them choose - // explicitly which filter pool they want to place the filter in. + // explicitly which filter pool they want to place the filter in. // To approximate the decision, we will define an advanced user as someone who already has a reference // to a filter pool other than the default pools in the active profiles. boolean advancedUser = false; @@ -584,7 +586,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda for (int idx = 0; idx < activeProfiles.length; idx++) { ISystemFilterPool defaultPool = getDefaultSystemFilterPool(config, activeProfiles[idx]); - + if (defaultPool != null) { poolWrapperInfo.addWrapper(activeProfiles[idx].getName(), defaultPool, (activeProfiles[idx] == activeProfile)); // display name, pool to wrap, whether to preselect @@ -596,7 +598,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda } } } - + /** * Given a profile, return the first (hopefully only) default pool for this * profile. @@ -608,14 +610,15 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda pool = mgr.getFirstDefaultSystemFilterPool(); // RETURN FIRST return pool; } - + /** * Overridable entry for child classes to supply their own flavour of ISystemFilterPoolWrapperInformation for * the new filter wizards. + * @since 3.0 replaced SystemFilterPoolWrapperInformation by ISystemFilterPoolWrapperInformation */ protected ISystemFilterPoolWrapperInformation getNewFilterWizardPoolWrapperInformation() { - return new SystemFilterPoolWrapperInformation(SystemResources.RESID_NEWFILTER_PAGE2_PROFILE_LABEL, SystemResources.RESID_NEWFILTER_PAGE2_PROFILE_TOOLTIP, + return new SystemFilterPoolWrapperInformation(SystemResources.RESID_NEWFILTER_PAGE2_PROFILE_LABEL, SystemResources.RESID_NEWFILTER_PAGE2_PROFILE_TOOLTIP, SystemResources.RESID_NEWFILTER_PAGE2_PROFILE_VERBIAGE); } /** @@ -636,7 +639,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda ((ISystemAction) actions[1]).setHelp(RSEUIPlugin.HELPPREFIX + "actn0041"); //$NON-NLS-1$ return actions; } - + /** * Supply the image to be used for filter pool managers, within actions. * REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE @@ -661,7 +664,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda { return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_FILTER_ID); } - + /** * Supply the image to be used for filter pool references. This implementation * just gets the referenced filter pool and calls the method @@ -674,7 +677,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda } /** - * Supply the image to be used for filter references. This implementation + * Supply the image to be used for filter references. This implementation * just gets the referenced filter and calls the method * getSystemFilterImage(ISystemFile) on it. * Override this method to provide custom images for filter references. @@ -683,8 +686,8 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda { return getSystemFilterImage(filterRef.getReferencedFilter()); } - - + + /* * Supply the image to be used for the given filter string, within actions. * REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE @@ -693,7 +696,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda { return getSystemFilterStringImage(filterString.getString()); } - + /* * Supply the image to be used for the given filter string string, within actions. * REQUIRED BY SYSTEMFILTERPOOLMANAGERPROVIDER INTERFACE @@ -708,7 +711,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda // HELPER METHODS TO SIMPLY EVENT FIRING... // ------------------------------------------------ - + // ------------------------------------------------ // FILTER POOL MANAGER PROVIDER CALLBACK METHODS... @@ -739,7 +742,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda { for (int idx = 0; idx < newActions.length; idx++) { - childActions.addElement(newActions[idx]); + childActions.addElement(newActions[idx]); //if (newActions[idx] instanceof SystemNewFilterAction) // ((SystemNewFilterAction) newActions[idx]).setCallBackConfigurator(this, null); } @@ -820,7 +823,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda * Overridable method to return the action for changing an existing filter. * By default returns new SystemChangeFilterAction, unless the filter's isSingleFilterStringOnly() * returns true, in which case null is returned. - * + * * @param selectedFilter the currently selected filter * @param shell parent shell of viewer where the popup menu is being constructed */ @@ -846,7 +849,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda *

    * By default, this method will call {@link #getChangeFilterAction(ISubSystemConfiguration, ISystemFilter, Shell)} to get * your change filter action, and will configure the given page from the dialog created by your - * change filter action. + * change filter action. *

    * If your filter uses its own Change Filter dialog, versus subclassing or configuring * {@link org.eclipse.rse.ui.filters.dialogs.SystemChangeFilterDialog} you will have to override this method @@ -873,7 +876,7 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda if (changeAction instanceof SystemChangeFilterAction) { SystemChangeFilterAction changeFilterAction = (SystemChangeFilterAction)changeAction; - changeFilterAction.setSelection(new StructuredSelection(selectedFilter)); + changeFilterAction.setSelection(new StructuredSelection(selectedFilter)); org.eclipse.jface.dialogs.Dialog dlg = changeFilterAction.createDialog(shell); if (dlg instanceof SystemChangeFilterDialog) { @@ -886,30 +889,30 @@ public class SubSystemConfigurationAdapter implements ISubSystemConfigurationAda page.setParentPoolPromptLabel(changeFilterDlg.getParentPoolPromptLabel(), changeFilterDlg.getParentPoolPromptTip()); page.setNamePromptLabel(changeFilterDlg.getNamePromptLabel(), changeFilterDlg.getNamePromptTip()); page.setNewListItemText(changeFilterDlg.getNewListItemText()); - - page.setDescription(changeFilterDlg.getTitle()); - } + + page.setDescription(changeFilterDlg.getTitle()); + } } if (selectedFilter.isNonChangable()) page.setEditable(false); //System.out.println("Selected filter: "+selectedFilter.getName()+", isSingleFilterStringOnly: "+selectedFilter.isSetSingleFilterStringOnly()); boolean singleFilterString = selectedFilter.isSingleFilterStringOnly() || (selectedFilter.isNonChangable() && (selectedFilter.getFilterStringCount() == 1)); if (singleFilterString) - page.setSupportsMultipleStrings(false); + page.setSupportsMultipleStrings(false); } - + /** * In addition to a change filter action, we now also support the same functionality - * via a Properties page for filter strings, in the Team View. When this page is activated, + * via a Properties page for filter strings, in the Team View. When this page is activated, * this method is called to enable customization of the page, given the selected filter string. - * + * *

    * By default, this method will call {@link #getChangeFilterAction(ISubSystemConfiguration, ISystemFilter, Shell)} to get * your change filter action, and will configure the given page from the dialog created by your - * change filter action. + * change filter action. *

    * If your filter uses its own Change Filter dialog, versus subclassing or configuring - * {@link org.eclipse.rse.ui.filters.dialogs.SystemChangeFilterDialog} you will have to + * {@link org.eclipse.rse.ui.filters.dialogs.SystemChangeFilterDialog} you will have to * override this method and specify the following information for the supplied page (via its setters): *