From c159c4a58290a487b1a64de589eeccb9ee57ea99 Mon Sep 17 00:00:00 2001 From: Kushal Munir < kmunir@ca.ibm.com> Date: Wed, 29 Nov 2006 03:04:10 +0000 Subject: [PATCH] Remove compile and javadoc warnings --- .../SystemOpenExplorerPerspectiveAction.java | 11 +----- .../rse/ui/widgets/InheritableEntryField.java | 28 ++++++------- .../core/subsystems/RemoteServerLauncher.java | 39 +++++++++---------- 3 files changed, 34 insertions(+), 44 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemOpenExplorerPerspectiveAction.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemOpenExplorerPerspectiveAction.java index 99c467e7a71..1b2597bd006 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemOpenExplorerPerspectiveAction.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/actions/SystemOpenExplorerPerspectiveAction.java @@ -16,6 +16,7 @@ package org.eclipse.rse.ui.actions; import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.jface.action.Action; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.rse.core.filters.ISystemFilterReference; import org.eclipse.rse.model.ISystemPromptableObject; @@ -23,12 +24,8 @@ import org.eclipse.rse.ui.ISystemContextMenuConstants; import org.eclipse.rse.ui.ISystemIconConstants; import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.rse.ui.SystemResources; -import org.eclipse.rse.ui.view.SystemPerspectiveLayout; import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IPerspectiveDescriptor; -import org.eclipse.ui.IPerspectiveRegistry; import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PlatformUI; import org.eclipse.ui.actions.OpenInNewWindowAction; @@ -42,8 +39,6 @@ public class SystemOpenExplorerPerspectiveAction { //private boolean replaceEnabled = true; private IWorkbenchWindow window; - private IPerspectiveRegistry reg; - private IPerspectiveDescriptor desc = null; /** * Constructor @@ -54,12 +49,10 @@ public class SystemOpenExplorerPerspectiveAction RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_PERSPECTIVE_ID), parent); this.window = currentWorkbenchWindow; - this.reg = PlatformUI.getWorkbench().getPerspectiveRegistry(); - this.desc = reg.findPerspectiveWithId(SystemPerspectiveLayout.ID); allowOnMultipleSelection(false); setContextMenuGroup(ISystemContextMenuConstants.GROUP_OPEN); - setHelp(RSEUIPlugin.HELPPREFIX+"actn0016"); + setHelp(RSEUIPlugin.HELPPREFIX+"actn0016"); //$NON-NLS-1$ } /** diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritableEntryField.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritableEntryField.java index ccf229f7a82..fa4382c1de8 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritableEntryField.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/InheritableEntryField.java @@ -57,8 +57,8 @@ import org.eclipse.swt.widgets.Text; public class InheritableEntryField extends Composite implements KeyListener { private InheritButton toggleButton = null; private Text entryField = null; - private String inheritValue = ""; - private String localValue = ""; + private String inheritValue = ""; //$NON-NLS-1$ + private String localValue = ""; //$NON-NLS-1$ private boolean isLocal = true; private boolean allowEditOfInherited = false; private List listeners; @@ -76,8 +76,8 @@ public class InheritableEntryField extends Composite implements KeyListener { * Constructor when you want to set the style of the toggle button and entry field too. * @param parent The parent composite to hold this widget * @param style the SWT style for this overall widget (eg, SWT.BORDER or SWT.NULL) - * @param style the SWT style for the toggle button widget - * @param style the SWT style for the entry field widget + * @param buttonStyle the SWT style for the toggle button widget + * @param textStyle the SWT style for the entry field widget */ public InheritableEntryField(Composite parent, int style, int buttonStyle, int textStyle) { this(parent, style, buttonStyle, textStyle, true); @@ -87,8 +87,8 @@ public class InheritableEntryField extends Composite implements KeyListener { * Constructor when you want to hide the toggle button * @param parent The parent composite to hold this widget * @param style the SWT style for this overall widget (eg, SWT.BORDER or SWT.NULL) - * @param style the SWT style for the toggle button widget - * @param style the SWT style for the entry field widget + * @param buttonStyle the SWT style for the toggle button widget + * @param textStyle the SWT style for the entry field widget * @param showToggleButton true to show the toggle button, false not to */ public InheritableEntryField(Composite parent, int style, int buttonStyle, int textStyle, boolean showToggleButton) { @@ -150,7 +150,7 @@ public class InheritableEntryField extends Composite implements KeyListener { * Set the entry field's inherited text value */ public void setInheritedText(String text) { - if (text == null) text = ""; + if (text == null) text = ""; //$NON-NLS-1$ this.inheritValue = text; } @@ -169,7 +169,7 @@ public class InheritableEntryField extends Composite implements KeyListener { * Set the entry field's local text value */ public void setLocalText(String text) { - if (text == null) text = ""; + if (text == null) text = ""; //$NON-NLS-1$ this.localValue = text; } @@ -181,7 +181,7 @@ public class InheritableEntryField extends Composite implements KeyListener { if (isLocal) return entryField.getText(); else - return ""; + return ""; //$NON-NLS-1$ } /** @@ -291,8 +291,8 @@ public class InheritableEntryField extends Composite implements KeyListener { // INTERNAL-USE METHODS... // ----------------------- /** - * Prepares this composite control and sets the default layout data. - * @param Number of columns the new group will contain. + * Prepares the given composite control and sets the default layout data. + * @param numColumns the number of columns in the composite layout. */ protected Composite prepareComposite(int numColumns) { Composite composite = this; @@ -313,9 +313,9 @@ public class InheritableEntryField extends Composite implements KeyListener { } /** - * Create our text field and insert it into a GridLayout. - * Assign the listener to the passed in implementer of Listener. - * @param GridLayout composite to put the field into. + * Creates a text field with a given style. + * @param parent the parent composite. + * @param textStyle the style of the text field. */ protected void createTextField(Composite parent, int textStyle) { entryField = new Text(parent, textStyle); diff --git a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/RemoteServerLauncher.java b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/RemoteServerLauncher.java index 8461cafbe01..657c06208b7 100644 --- a/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/RemoteServerLauncher.java +++ b/rse/plugins/org.eclipse.rse.ui/subsystems/org/eclipse/rse/core/subsystems/RemoteServerLauncher.java @@ -36,19 +36,16 @@ import org.eclipse.rse.ui.SystemResources; * user a number of ways to start that remote server from the client, as well to connect * to it if it is already running. This class encapsulates the properties to support that. *

- * Create instances via {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#createRemoteServerLauncher(ISubSystem)} + * Create instances via {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#createServerLauncher(IConnectorService)} * *

* The following features are implemented: *

*

* @@ -60,14 +57,14 @@ public class RemoteServerLauncher extends ServerLauncher implements IRemoteServe protected static final ServerLaunchType SERVER_LAUNCH_TYPE_EDEFAULT = ServerLaunchType.DAEMON_LITERAL; // proeprty set keys - protected final String PROPERTY_SET_NAME = "Launcher Properties"; + protected final String PROPERTY_SET_NAME = "Launcher Properties"; //$NON-NLS-1$ - protected final String KEY_DAEMON_PORT = "daemon.port"; - protected final String KEY_REXEC_PORT = "rexec.port"; - protected final String KEY_SERVER_LAUNCH_TYPE_NAME = "server.launch.type.name"; - protected final String KEY_SERVER_PATH = "server.path"; - protected final String KEY_SERVER_SCRIPT = "server.script"; - protected final String KEY_AUTODETECT_SSL = "autodetect.ssl"; + protected final String KEY_DAEMON_PORT = "daemon.port"; //$NON-NLS-1$ + protected final String KEY_REXEC_PORT = "rexec.port"; //$NON-NLS-1$ + protected final String KEY_SERVER_LAUNCH_TYPE_NAME = "server.launch.type.name"; //$NON-NLS-1$ + protected final String KEY_SERVER_PATH = "server.path"; //$NON-NLS-1$ + protected final String KEY_SERVER_SCRIPT = "server.script"; //$NON-NLS-1$ + protected final String KEY_AUTODETECT_SSL = "autodetect.ssl"; //$NON-NLS-1$ protected ServerLaunchType _serverLaunchType = SERVER_LAUNCH_TYPE_EDEFAULT; @@ -204,24 +201,24 @@ public class RemoteServerLauncher extends ServerLauncher implements IRemoteServe IProperty launchTypeProperty = set.addProperty(KEY_SERVER_LAUNCH_TYPE_NAME, _serverLaunchType.getName(), getServerLauncherPropertyType()); launchTypeProperty.setLabel(SystemResources.RESID_PROP_SERVERLAUNCHER_MEANS_LABEL); - IProperty daemonPortProperty = set.addProperty(KEY_DAEMON_PORT, ""+_daemonPort, PropertyType.getIntegerPropertyType()); + IProperty daemonPortProperty = set.addProperty(KEY_DAEMON_PORT, ""+_daemonPort, PropertyType.getIntegerPropertyType()); //$NON-NLS-1$ daemonPortProperty.setEnabled(_serverLaunchType.getType() == ServerLaunchType.DAEMON); daemonPortProperty.setLabel(SystemResources.RESID_CONNECTION_DAEMON_PORT_LABEL); - IProperty rexecPortProperty = set.addProperty(KEY_REXEC_PORT, ""+_rexecPort, PropertyType.getIntegerPropertyType()); + IProperty rexecPortProperty = set.addProperty(KEY_REXEC_PORT, ""+_rexecPort, PropertyType.getIntegerPropertyType()); //$NON-NLS-1$ boolean usingRexec = _serverLaunchType.getType() == ServerLaunchType.REXEC; rexecPortProperty.setEnabled(usingRexec); rexecPortProperty.setLabel(SystemResources.RESID_CONNECTION_PORT_LABEL); - IProperty autoDetectSSLProperty = set.addProperty(KEY_AUTODETECT_SSL, ""+_autoDetectSSL, PropertyType.getBooleanPropertyType()); + IProperty autoDetectSSLProperty = set.addProperty(KEY_AUTODETECT_SSL, ""+_autoDetectSSL, PropertyType.getBooleanPropertyType()); //$NON-NLS-1$ autoDetectSSLProperty.setEnabled(usingRexec); autoDetectSSLProperty.setLabel(SystemResources.RESID_SUBSYSTEM_AUTODETECT_LABEL); - IProperty serverPathProperty = set.addProperty(KEY_SERVER_PATH, ""+_serverPath); + IProperty serverPathProperty = set.addProperty(KEY_SERVER_PATH, ""+_serverPath); //$NON-NLS-1$ serverPathProperty.setLabel(SystemResources.RESID_PROP_SERVERLAUNCHER_PATH); serverPathProperty.setEnabled(usingRexec); - IProperty serverScriptProperty = set.addProperty(KEY_SERVER_SCRIPT, ""+_serverScript); + IProperty serverScriptProperty = set.addProperty(KEY_SERVER_SCRIPT, ""+_serverScript); //$NON-NLS-1$ serverScriptProperty.setEnabled(usingRexec); serverScriptProperty.setLabel(SystemResources.RESID_PROP_SERVERLAUNCHER_INVOCATION); } @@ -411,7 +408,7 @@ public class RemoteServerLauncher extends ServerLauncher implements IRemoteServe if ((serverScript == null) || (serverScript.length() == 0)) { - serverScript = "server." + getConnectorService().getHost().getSystemType().toLowerCase(); + serverScript = "server." + getConnectorService().getHost().getSystemType().toLowerCase(); //$NON-NLS-1$ } return serverScript; @@ -438,13 +435,13 @@ public class RemoteServerLauncher extends ServerLauncher implements IRemoteServe */ public boolean isEnabledServerLaunchType(ServerLaunchType serverLaunchType) { - IPropertySet set = getPropertySet("restrictedTypes"); + IPropertySet set = getPropertySet("restrictedTypes"); //$NON-NLS-1$ if (set != null) { String value = set.getPropertyValue(serverLaunchType.getName()); if (value != null) { - return value.equals("true"); + return value.equals("true"); //$NON-NLS-1$ } } @@ -465,10 +462,10 @@ public class RemoteServerLauncher extends ServerLauncher implements IRemoteServe */ public void setRestrictedType(String attributeName, String attributeValue) { - IPropertySet set = getPropertySet("restrictedTypes"); + IPropertySet set = getPropertySet("restrictedTypes"); //$NON-NLS-1$ if (set == null) { - set = createPropertySet("restrictedTypes", getDescription()); + set = createPropertySet("restrictedTypes", getDescription()); //$NON-NLS-1$ } set.addProperty(attributeName, attributeValue); }