From ba9a89c968022b80b626c7875c5c63e1a174cd9c Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Tue, 28 Nov 2006 15:57:20 +0000 Subject: [PATCH] [cleanup] compiler warnings --- .../rse/shells/ui/view/CommandsViewPage.java | 3 ++- .../shells/ui/view/SystemCommandsView.java | 9 ++++--- .../view/SystemViewRemoteOutputAdapter.java | 10 +++---- .../servicesubsystem/OutputRefreshJob.java | 1 - .../shells/subsystems/RemoteCmdSubSystem.java | 16 +++++------- .../shells/subsystems/RemoteSystemEnvVar.java | 6 ++--- .../rse/subsystems/shells/core/Activator.java | 2 +- .../subsystems/shells/core/ShellStrings.java | 2 +- .../core/model/ISystemOutputRemoteTypes.java | 26 +++++++++---------- .../core/model/RemoteCommandFilterString.java | 8 +++--- .../model/RemoteCommandShellOperation.java | 8 +++--- .../core/model/SimpleCommandOperation.java | 2 +- .../core/subsystems/IRemoteCmdSubSystem.java | 22 ++++++++-------- .../core/subsystems/IRemoteCommandShell.java | 2 +- .../local/model/LocalServiceCommandShell.java | 5 ++-- .../shells/ssh/SshServiceCommandShell.java | 2 +- .../ui/view/SystemViewPromptableAdapter.java | 2 +- 17 files changed, 62 insertions(+), 64 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandsViewPage.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandsViewPage.java index 94564869cb8..dceb44f7491 100644 --- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandsViewPage.java +++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandsViewPage.java @@ -34,6 +34,7 @@ import org.eclipse.rse.services.clientserver.PathUtility; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.shells.ui.ShellResources; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; +import org.eclipse.rse.subsystems.shells.core.model.ISystemOutputRemoteTypes; import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem; import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell; import org.eclipse.rse.ui.ISystemMessages; @@ -383,7 +384,7 @@ FocusListener else if (element instanceof RemoteOutput) { RemoteOutput out = (RemoteOutput)element; - if (out.getType().equals("directory")) //$NON-NLS-1$ + if (out.getType().equals(ISystemOutputRemoteTypes.TYPE_DIRECTORY)) { String path = out.getAbsolutePath(); ISubSystem cmdSubSystem = adapter.getSubSystem(element); diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsView.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsView.java index 2da26570ffe..3e7663df60f 100644 --- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsView.java +++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandsView.java @@ -22,6 +22,7 @@ import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.rse.model.ISystemResourceChangeEvent; import org.eclipse.rse.model.ISystemResourceChangeEvents; +import org.eclipse.rse.subsystems.shells.core.model.ISystemOutputRemoteTypes; import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell; import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteOutput; import org.eclipse.rse.ui.ISystemThemeConstants; @@ -210,16 +211,16 @@ public class SystemCommandsView extends SystemTableView implements ISystemThemeC { IRemoteOutput rmtOutput = (IRemoteOutput) child; String type = rmtOutput.getType(); - if (type.equals("stderr") || type.equals("error")) //$NON-NLS-1$ //$NON-NLS-2$ + if (type.equals("stderr") || type.equals(ISystemOutputRemoteTypes.TYPE_ERROR)) //$NON-NLS-1$ { newItem.setForeground(_errColor); - } else if (type.equals("warning")) //$NON-NLS-1$ + } else if (type.equals(ISystemOutputRemoteTypes.TYPE_WARNING)) { newItem.setForeground(_warColor); - } else if (type.equals("informational")) //$NON-NLS-1$ + } else if (type.equals(ISystemOutputRemoteTypes.TYPE_INFORMATIONAL)) { newItem.setForeground(_infColor); - } else if (type.equals("prompt")) //$NON-NLS-1$ + } else if (type.equals(ISystemOutputRemoteTypes.TYPE_PROMPT)) { newItem.setForeground(_prmColor); } else diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteOutputAdapter.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteOutputAdapter.java index aa74edbb7c3..c0e4b3fce70 100644 --- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteOutputAdapter.java +++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemViewRemoteOutputAdapter.java @@ -125,7 +125,7 @@ implements ISystemViewElementAdapter, ISystemRemoteElementAdapter, ISystemOutpu { IRemoteOutput result = (IRemoteOutput) firstSelection; String type = result.getType(); - if (type.equals("prompt")) //$NON-NLS-1$ + if (type.equals(ISystemOutputRemoteTypes.TYPE_PROMPT)) { if (_pasteToPromptAction == null) { @@ -134,7 +134,7 @@ implements ISystemViewElementAdapter, ISystemRemoteElementAdapter, ISystemOutpu menu.add(menuGroup, _pasteToPromptAction); } - else if (type.equals("directory")) //$NON-NLS-1$ + else if (type.equals(ISystemOutputRemoteTypes.TYPE_DIRECTORY)) { IRemoteOutput output = (IRemoteOutput)firstSelection; if (output.getAbsolutePath() != null) @@ -478,15 +478,15 @@ implements ISystemViewElementAdapter, ISystemRemoteElementAdapter, ISystemOutpu // // marker = localMatch.createMarker(IMarker.TEXT); // -// if (type.equals("error")) +// if (type.equals(ISystemOutputRemoteTypes.TYPE_ERROR)) // { // marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR); // } -// else if (type.equals("warning")) +// else if (type.equals(ISystemOutputRemoteTypes.TYPE_WARNING)) // { // marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_WARNING); // } -// else if (type.equals("informational")) +// else if (type.equals(ISystemOutputRemoteTypes.TYPE_INFORMATIONAL)) // { // marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_INFO); // } diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/servicesubsystem/OutputRefreshJob.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/servicesubsystem/OutputRefreshJob.java index f7d9e68b4d1..9e3d80c2625 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/servicesubsystem/OutputRefreshJob.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/servicesubsystem/OutputRefreshJob.java @@ -19,7 +19,6 @@ package org.eclipse.rse.internal.subsystems.shells.servicesubsystem; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; -import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.model.ISystemResourceChangeEvents; import org.eclipse.rse.model.SystemRegistry; import org.eclipse.rse.model.SystemResourceChangeEvent; diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteCmdSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteCmdSubSystem.java index 4150becee9f..ae52b6f63a5 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteCmdSubSystem.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteCmdSubSystem.java @@ -29,7 +29,6 @@ import org.eclipse.core.runtime.OperationCanceledException; import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.core.model.IPropertySet; -import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.subsystems.CommunicationsEvent; import org.eclipse.rse.core.subsystems.ICommunicationsListener; import org.eclipse.rse.core.subsystems.IConnectorService; @@ -172,7 +171,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd } catch (Exception exc) { - SystemBasePlugin.logError("Error saving command subsystem after setting env var entries", exc); + SystemBasePlugin.logError("Error saving command subsystem after setting env var entries", exc); //$NON-NLS-1$ } } @@ -206,7 +205,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd } catch (Exception exc) { - SystemBasePlugin.logError("Error saving command subsystem after adding env var entry", exc); + SystemBasePlugin.logError("Error saving command subsystem after adding env var entry", exc); //$NON-NLS-1$ } } @@ -222,7 +221,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd } catch (Exception exc) { - SystemBasePlugin.logError("Error saving command subsystem after removing env var entry", exc); + SystemBasePlugin.logError("Error saving command subsystem after removing env var entry", exc); //$NON-NLS-1$ } } @@ -486,7 +485,6 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd * Get the default running command shell for this command subsystem. If no * such shell exists or is running, a new one is launched. * - * @param shell the window used for notification * @return the default running command shell */ public IRemoteCommandShell getDefaultShell() throws Exception @@ -940,7 +938,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd } else SystemBasePlugin.logDebugMessage(this.getClass().getName(), - "in SubSystemImpl.sendCommandToShell: isConnected() returning false!"); + "in SubSystemImpl.sendCommandToShell: isConnected() returning false!"); //$NON-NLS-1$ } @@ -978,15 +976,13 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd } else SystemBasePlugin.logDebugMessage(this.getClass().getName(), - "in SubSystemImpl.cancelShell: isConnected() returning false!"); + "in SubSystemImpl.cancelShell: isConnected() returning false!"); //$NON-NLS-1$ } } /** * Remove and Cancel a shell or running command. * - * @param shell parent shell used to show error message. Null means you will - * handle showing the error message. * @param commandObject the shell or command to cancel. */ public void removeShell(Object commandObject) throws Exception @@ -1018,7 +1014,7 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd } else SystemBasePlugin.logDebugMessage(this.getClass().getName(), - "in SubSystemImpl.removeShell: isConnected() returning false!"); + "in SubSystemImpl.removeShell: isConnected() returning false!"); //$NON-NLS-1$ } } diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteSystemEnvVar.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteSystemEnvVar.java index 7194dbb0f83..52487f70ac3 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteSystemEnvVar.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/subsystems/RemoteSystemEnvVar.java @@ -150,11 +150,11 @@ public class RemoteSystemEnvVar implements IRemoteSystemEnvVar StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); + result.append(" (name: "); //$NON-NLS-1$ result.append(name); - result.append(", value: "); + result.append(", value: "); //$NON-NLS-1$ result.append(value); - result.append(", additionalAttributes: "); + result.append(", additionalAttributes: "); //$NON-NLS-1$ result.append(additionalAttributes); result.append(')'); return result.toString(); diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/Activator.java index dfed471d264..89ad30416df 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/Activator.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/Activator.java @@ -65,6 +65,6 @@ public class Activator extends AbstractUIPlugin { * @return the image descriptor */ public static ImageDescriptor getImageDescriptor(String path) { - return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.subsystems.shells.core", path); + return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.subsystems.shells.core", path); //$NON-NLS-1$ } } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/ShellStrings.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/ShellStrings.java index 6c598cfee9a..83fe1d227ff 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/ShellStrings.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/ShellStrings.java @@ -20,7 +20,7 @@ import org.eclipse.osgi.util.NLS; public class ShellStrings extends NLS { - private static String BUNDLE_NAME = "org.eclipse.rse.subsystems.shells.core.ShellStrings"; + private static String BUNDLE_NAME = "org.eclipse.rse.subsystems.shells.core.ShellStrings"; //$NON-NLS-1$ public static String RESID_SHELLS_COMMAND_SHELL_LABEL; public static String RSESubSystemOperation_Cancel_Shell_message; diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/ISystemOutputRemoteTypes.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/ISystemOutputRemoteTypes.java index 73ce0478dcf..03ea12539c3 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/ISystemOutputRemoteTypes.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/ISystemOutputRemoteTypes.java @@ -30,7 +30,7 @@ public interface ISystemOutputRemoteTypes * There is only one type category for remote output. * It is "output". */ - public static final String TYPECATEGORY = "output"; + public static final String TYPECATEGORY = "output"; //$NON-NLS-1$ // ----------- @@ -40,62 +40,62 @@ public interface ISystemOutputRemoteTypes /** * A folder object */ - public static final String TYPE_DIRECTORY = "directory"; + public static final String TYPE_DIRECTORY = "directory"; //$NON-NLS-1$ /** * A file object */ - public static final String TYPE_FILE = "file"; + public static final String TYPE_FILE = "file"; //$NON-NLS-1$ /** * A command object */ - public static final String TYPE_COMMAND = "command"; + public static final String TYPE_COMMAND = "command"; //$NON-NLS-1$ /** * A prompt object */ - public static final String TYPE_PROMPT = "prompt"; + public static final String TYPE_PROMPT = "prompt"; //$NON-NLS-1$ /** * An error object */ - public static final String TYPE_ERROR = "error"; + public static final String TYPE_ERROR = "error"; //$NON-NLS-1$ /** * A warning object */ - public static final String TYPE_WARNING = "warning"; + public static final String TYPE_WARNING = "warning"; //$NON-NLS-1$ /** * An informational object */ - public static final String TYPE_INFORMATIONAL = "informational"; + public static final String TYPE_INFORMATIONAL = "informational"; //$NON-NLS-1$ /** * A grep object */ - public static final String TYPE_GREP = "grep"; + public static final String TYPE_GREP = "grep"; //$NON-NLS-1$ /** * An environment variable object */ - public static final String TYPE_ENVVAR = "envvar"; + public static final String TYPE_ENVVAR = "envvar"; //$NON-NLS-1$ /** * A libpath environment variable object */ - public static final String TYPE_ENVVAR_LIBPATH = "libpathenvvar"; + public static final String TYPE_ENVVAR_LIBPATH = "libpathenvvar"; //$NON-NLS-1$ /** * The path environment variable object */ - public static final String TYPE_ENVVAR_PATH = "pathenvvar"; + public static final String TYPE_ENVVAR_PATH = "pathenvvar"; //$NON-NLS-1$ /** * A process object */ - public static final String TYPE_PROCESS = "process"; + public static final String TYPE_PROCESS = "process"; //$NON-NLS-1$ } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandFilterString.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandFilterString.java index 64006f4d653..b2876cdb3ae 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandFilterString.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/RemoteCommandFilterString.java @@ -55,7 +55,7 @@ public class RemoteCommandFilterString implements Cloneable */ public RemoteCommandFilterString() { - shellStr = "*"; + shellStr = "*"; //$NON-NLS-1$ } /** * Constructor to use when there is no existing filter string. @@ -67,7 +67,7 @@ public class RemoteCommandFilterString implements Cloneable */ public RemoteCommandFilterString(IRemoteCmdSubSystemConfiguration subsysFactory) { - shellStr = "*"; + shellStr = "*"; //$NON-NLS-1$ } /** * Constructor to use when an absolute filter string already exists. @@ -106,9 +106,9 @@ public class RemoteCommandFilterString implements Cloneable */ public static String getTypesString(String[] typesArray) { - StringBuffer typesBuffer = new StringBuffer(""); + StringBuffer typesBuffer = new StringBuffer(""); //$NON-NLS-1$ for (int idx=0; idx 0) { - if (outputEcho.charAt(index - 1) != ';' && (outputEcho.indexOf("echo") == -1)) + if (outputEcho.charAt(index - 1) != ';' && (outputEcho.indexOf("echo") == -1)) //$NON-NLS-1$ { return true; } diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/SimpleCommandOperation.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/SimpleCommandOperation.java index 05ae92231f0..309e4f6cd87 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/SimpleCommandOperation.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/model/SimpleCommandOperation.java @@ -128,7 +128,7 @@ public class SimpleCommandOperation } } - return ""; + return ""; //$NON-NLS-1$ } } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystem.java index 47f14327b2c..3b708495cfb 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystem.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCmdSubSystem.java @@ -43,11 +43,11 @@ public interface IRemoteCmdSubSystem extends ISubSystem{ * Execute a remote command. This is only applicable if the subsystem factory reports * true for supportsCommands(). * @param command Command to be executed remotely. - * @param Object context context of a command (i.e. working directory). Null is valid and means to run the + * @param context context of a command (i.e. working directory). Null is valid and means to run the * command as a shell command in the default shell. * @return Array of objects that are the result of running this command. Typically, these * are messages logged by the command. - * @see org.eclipse.rse.core.subsystems.shells.ui.RemoteCommandHelpers + * @see org.eclipse.rse.shells.ui.RemoteCommandHelpers */ public Object[] runCommand(String command, Object context) throws Exception; @@ -55,12 +55,12 @@ public interface IRemoteCmdSubSystem extends ISubSystem{ * Execute a remote command. This is only applicable if the subsystem factory reports * true for supportsCommands(). * @param command Command to be executed remotely. - * @param Object context context of a command (i.e. working directory). Null is valid and means to run the + * @param context context of a command (i.e. working directory). Null is valid and means to run the * command as a shell command in the default shell. * @param interpretOutput whether to interpret the output or not * @return Array of objects that are the result of running this command. Typically, these * are messages logged by the command. - * @see org.eclipse.rse.core.subsystems.shells.ui.RemoteCommandHelpers + * @see org.eclipse.rse.shells.ui.RemoteCommandHelpers */ public Object[] runCommand(String command, Object context, boolean interpretOutput) throws Exception; @@ -68,30 +68,30 @@ public interface IRemoteCmdSubSystem extends ISubSystem{ /** * Launch a new command shell. This is only applicable if the subsystem factory reports * true for supportsCommands(). - * @param Object context context of a shell (i.e. working directory). Null is valid and means to use the default context. + * @param context context of a shell (i.e. working directory). Null is valid and means to use the default context. * @return An object that represents the command and it's output. - * @see org.eclipse.rse.core.subsystems.shells.ui.RemoteCommandHelpers + * @see org.eclipse.rse.shells.ui.RemoteCommandHelpers */ public IRemoteCommandShell runShell(Object context) throws Exception; /** * Send a command as input to a running command shell. - * @param String input the command to invoke in the shell. - * @param Object commandObject the shell or command to send the invocation to. - * @see org.eclipse.rse.core.subsystems.shells.ui.RemoteCommandHelpers + * @param input the command to invoke in the shell. + * @param commandObject the shell or command to send the invocation to. + * @see org.eclipse.rse.shells.ui.RemoteCommandHelpers */ public void sendCommandToShell(String input, Object commandObject) throws Exception; /** * Cancel a shell or running command. - * @param Object commandObject the shell or command to cancel. + * @param commandObject the shell or command to cancel. */ public void cancelShell(Object commandObject) throws Exception; /** * Remove a shell. If the shell is running cancel it first. - * @param Object commandObject the shell or command to cancel & remove. + * @param commandObject the shell or command to cancel & remove. */ public void removeShell(Object commandObject) throws Exception; diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCommandShell.java index 80f845659bd..5aede73fe06 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCommandShell.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/subsystems/shells/core/subsystems/IRemoteCommandShell.java @@ -55,7 +55,7 @@ public interface IRemoteCommandShell /** * Get the current context for this command shell. In the case of a unix shell, this * will be the working directory as an - * @see org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile. + * @link{org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile}. * * This is used in order to store the state of the current shell on disconnect, * such that the same directory can be set on reconnect. It may also be used diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/model/LocalServiceCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/model/LocalServiceCommandShell.java index 73b75dba262..1f83279a885 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/model/LocalServiceCommandShell.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/model/LocalServiceCommandShell.java @@ -29,6 +29,7 @@ import org.eclipse.rse.services.shells.IHostShellChangeEvent; import org.eclipse.rse.services.shells.ParsedOutput; import org.eclipse.rse.services.shells.Patterns; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem; +import org.eclipse.rse.subsystems.shells.core.model.ISystemOutputRemoteTypes; import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem; import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteOutput; import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ServiceCommandShell; @@ -114,13 +115,13 @@ public class LocalServiceCommandShell extends ServiceCommandShell if (parsedMsg != null) { String file = parsedMsg.file; - if (type.equals("prompt")) //$NON-NLS-1$ + if (type.equals(ISystemOutputRemoteTypes.TYPE_PROMPT)) { _workingDir = file; output.setAbsolutePath(_workingDir); } /* - else if (type.equals("file") || type.equals("directory")) + else if (type.equals(ISystemOutputRemoteTypes.TYPE_FILE) || type.equals(ISystemOutputRemoteTypes.TYPE_DIRECTORY)) { output.setAbsolutePath(parsedMsg.file); } diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshServiceCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshServiceCommandShell.java index 50e7adb2b03..941116038cc 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshServiceCommandShell.java +++ b/rse/plugins/org.eclipse.rse.subsystems.shells.ssh/src/org/eclipse/rse/subsystems/shells/ssh/SshServiceCommandShell.java @@ -142,7 +142,7 @@ public class SshServiceCommandShell extends ServiceCommandShell implements ISyst if (parsedMsg != null) { String file = parsedMsg.file; - if (type.equals("prompt")) //$NON-NLS-1$ + if (type.equals(ISystemOutputRemoteTypes.TYPE_PROMPT)) { _workingDir = file; output.setAbsolutePath(_workingDir); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPromptableAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPromptableAdapter.java index d0d62860bd3..259e46e84eb 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPromptableAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemViewPromptableAdapter.java @@ -182,7 +182,7 @@ public class SystemViewPromptableAdapter */ public String getMementoHandleKey(Object element) { - return "Prompt"; + return "Prompt"; //$NON-NLS-1$ } /**