org.eclipse.rse.subsystems.shells.core.model
Class RemoteCommandShell
java.lang.Object
org.eclipse.rse.subsystems.shells.core.model.RemoteCommandShell
-
All Implemented Interfaces:
-
IAdaptable,
IRemoteCommandShell
-
Direct Known Subclasses:
-
ServiceCommandShell
-
public abstract class RemoteCommandShell
- extends
Object
- implements
IAdaptable,
IRemoteCommandShell
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
_id
protected
String _id
_name
protected
String _name
_type
protected
String _type
_cwd
protected
IRemoteFile _cwd
_output
protected
ArrayList _output
_fileSubSystem
protected
IRemoteFileSubSystem _fileSubSystem
_cmdSubSystem
protected
IRemoteCmdSubSystem _cmdSubSystem
_cmdHistory
protected
ArrayList _cmdHistory
_project
protected
IProject _project
RemoteCommandShell
public RemoteCommandShell(
IRemoteCmdSubSystem cmdSubSystem)
setName
public void setName(
String name)
-
-
getName
public
String getName()
-
Description copied from interface:
IRemoteCommandShell
- Gets the name of the command shell or command that is being run.
-
-
Specified by:
-
getName
in interface
IRemoteCommandShell
-
-
Returns:
- the name of the command
getId
public
String getId()
-
Description copied from interface:
IRemoteCommandShell
- Gets the ID of the command shell
-
-
Specified by:
-
getId
in interface
IRemoteCommandShell
-
-
Returns:
- the id
setType
public void setType(
String type)
-
-
getType
public
String getType()
-
Description copied from interface:
IRemoteCommandShell
- Gets the type of the command shell or command that is being run. The type may either be a "Shell" or a "Command".
-
-
Specified by:
-
getType
in interface
IRemoteCommandShell
-
-
Returns:
- the type of the command
getAdapter
public
Object getAdapter(
Class adapterType)
-
-
Specified by:
-
getAdapter
in interface
IAdaptable
-
listOutput
public
Object[] listOutput()
-
Description copied from interface:
IRemoteCommandShell
- Get the list of output objects for this command.
-
-
Specified by:
-
listOutput
in interface
IRemoteCommandShell
-
-
Returns:
- the list of output objects
getIndexOf
public int getIndexOf(
Object output)
-
Description copied from interface:
IRemoteCommandShell
- Get the position of this output object in the command container
-
-
Specified by:
-
getIndexOf
in interface
IRemoteCommandShell
-
getOutputAt
public
Object getOutputAt(int index)
-
Description copied from interface:
IRemoteCommandShell
- Get the output object the specified index
-
-
Specified by:
-
getOutputAt
in interface
IRemoteCommandShell
-
getSize
public int getSize()
-
Description copied from interface:
IRemoteCommandShell
- Return the number of output objects for this command.
-
-
Specified by:
-
getSize
in interface
IRemoteCommandShell
-
-
Returns:
- the number of output objects
addOutput
public void addOutput(
Object output)
-
Description copied from interface:
IRemoteCommandShell
- Add an output object to the list of output for this command
-
-
Specified by:
-
addOutput
in interface
IRemoteCommandShell
-
-
Parameters:
-
output
- the output object to add
removeOutput
public void removeOutput()
-
Description copied from interface:
IRemoteCommandShell
- Remove output from the list of output for this command
-
-
Specified by:
-
removeOutput
in interface
IRemoteCommandShell
-
removeOutput
public void removeOutput(
Object output)
-
Description copied from interface:
IRemoteCommandShell
- Remove output from the list of output for this command
-
-
Specified by:
-
removeOutput
in interface
IRemoteCommandShell
-
getFileSubSystem
public
IRemoteFileSubSystem getFileSubSystem()
-
Description copied from interface:
IRemoteCommandShell
- Return the file subsystem associated with this command
-
-
Specified by:
-
getFileSubSystem
in interface
IRemoteCommandShell
-
-
Returns:
- the file subsystem associated with this command
getCommandSubSystem
public
IRemoteCmdSubSystem getCommandSubSystem()
-
Description copied from interface:
IRemoteCommandShell
- Return the command subsystem associated with this command
-
-
Specified by:
-
getCommandSubSystem
in interface
IRemoteCommandShell
-
-
Returns:
- the command subsystem associated with this command
getRoots
public
Object[] getRoots()
-
-
getTitle
public abstract
String getTitle()
-
-
isActive
public abstract boolean isActive()
-
Description copied from interface:
IRemoteCommandShell
- Indicate whether the corresponding command is running or not
-
-
Specified by:
-
isActive
in interface
IRemoteCommandShell
-
-
Returns:
- whether the command is running or not
updateHistory
public void updateHistory(
String cmd)
-
-
Specified by:
-
updateHistory
in interface
IRemoteCommandShell
-
getHistory
public
String[] getHistory()
-
Description copied from interface:
IRemoteCommandShell
- Return the list of commands passed into this command
-
-
Specified by:
-
getHistory
in interface
IRemoteCommandShell
-
-
Returns:
- the list of commands issued
getContext
public
Object getContext()
- Get the current working directory for this command
-
-
Specified by:
-
getContext
in interface
IRemoteCommandShell
-
-
Returns:
- the current working directory
getContextString
public
String getContextString()
- Returns the context of this Shell as a String for persistence.
The context is typically the current working directory.
Returns an empty String if no context can be determined.
-
-
Specified by:
-
getContextString
in interface
IRemoteCommandShell
-
-
Returns:
- The current context as String, or an empty String
if no context exists. Never returns
null
.
getWorkingDirectory
public
IRemoteFile getWorkingDirectory()
- Get the current working directory for this command
-
-
-
Returns:
- the current working directory
setWorkingDirectory
public void setWorkingDirectory(
IRemoteFile file)
- Set the current working directory for this command
-
-
-
Parameters:
-
file
- the working directory.
isWindows
protected boolean isWindows()
-
-
getCandidateCommands
public abstract
ICandidateCommand[] getCandidateCommands()
- Override to provide a list of possible commands
-
-
Specified by:
-
getCandidateCommands
in interface
IRemoteCommandShell
-
-
Returns:
- the list of possible commands
associateProject
public void associateProject(
IProject project)
-
-
Specified by:
-
associateProject
in interface
IRemoteCommandShell
-
getAssociatedProject
public
IProject getAssociatedProject()
-
-
Specified by:
-
getAssociatedProject
in interface
IRemoteCommandShell
-
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.