|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectconsole.Shell
console.SystemShell
public class SystemShell
A SystemShell is shared across all instances of Console. It has own environment (variables), and executes system statements in a shell which resembles in terms of user interface, something that is a cross between the Windows "cmd.exe" and the Linux bash shell, so it should be easy to use for both. It manages a mapping of Console to ConsoleState objects, where the ConsoleState manages the actual ConsoleProcess and the state of that shell. When SystemShell executes something, the process itself is started indirectly by ProcessRunner.exec().
Nested Class Summary |
---|
Nested classes/interfaces inherited from class console.Shell |
---|
Shell.CompletionInfo, Shell.ShellAction, Shell.SwitchAction, Shell.ToggleAction |
Field Summary |
---|
Fields inherited from class console.Shell |
---|
SERVICE |
Constructor Summary | |
---|---|
SystemShell()
|
Method Summary | |
---|---|
void |
beforeStopping()
|
boolean |
chDir(Console console,
java.lang.String path)
A System Shell can override this method if it can respond to chDir messages |
void |
closeConsole(Console console)
Called when a Console dockable is closed. |
void |
detach(Console console)
Detaches the currently running process. |
void |
done(org.gjt.sp.util.Task task)
|
void |
endOfFile(Console console)
Sends an end of file. |
void |
execute(Console console,
java.lang.String input,
Output output,
Output error,
java.lang.String command)
Executes a command. |
void |
executeBuiltIn(Console console,
Output output,
Output error,
java.lang.String command,
java.util.Vector<java.lang.String> args)
|
java.util.Hashtable<java.lang.String,java.lang.String> |
getAliases()
|
Shell.CompletionInfo |
getCompletions(Console console,
java.lang.String command)
Returns possible completions for the specified command. |
java.lang.String |
getVariableValue(org.gjt.sp.jedit.View view,
java.lang.String varName)
|
boolean |
handlesVFS(java.lang.String vfsPath)
A System Shell can override this method and use any criteria at all to decide whether this is a path that is preferred by this shell. |
void |
maximumUpdated(org.gjt.sp.util.Task task)
|
void |
openConsole(Console console)
Called when a Console dockable first selects this shell. |
void |
printInfoMessage(Output output)
Prints a 'info' message to the specified console. |
void |
printPrompt(Console console,
Output output)
Prints a prompt to the specified console. |
void |
running(org.gjt.sp.util.Task task)
|
void |
statusUpdated(org.gjt.sp.util.Task task)
|
void |
stop(Console console)
Stops the currently executing command, if any. |
void |
valueUpdated(org.gjt.sp.util.Task task)
|
boolean |
waitFor(Console console)
Waits for currently running Console processes to finish execution. |
void |
waiting(org.gjt.sp.util.Task task)
|
Methods inherited from class console.Shell |
---|
execute, getName, getShell, getShellNames, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SystemShell()
Method Detail |
---|
public void beforeStopping()
public void openConsole(Console console)
openConsole
in class Shell
public void closeConsole(Console console)
closeConsole
in class Shell
public void printInfoMessage(Output output)
Shell
printInfoMessage
in class Shell
output
- The outputpublic void printPrompt(Console console, Output output)
printPrompt
in class Shell
output
- The outputconsole
- The console instancepublic void executeBuiltIn(Console console, Output output, Output error, java.lang.String command, java.util.Vector<java.lang.String> args)
public boolean handlesVFS(java.lang.String vfsPath)
Shell
handlesVFS
in class Shell
vfsPath
- the path to test if this shell handles
public boolean chDir(Console console, java.lang.String path)
Shell
chDir
in class Shell
path
- vfs path to change directory
public void execute(Console console, java.lang.String input, Output output, Output error, java.lang.String command)
Shell
execute
in class Shell
console
- The Console instance, to distinguish it from others when there are
multiple View or Console instances.input
- optional string to feed into the command's Standard inputoutput
- Standard output - the destination to send outputerror
- Standard error - the destionation to send error messagescommand
- The commandpublic void stop(Console console)
Shell
stop
in class Shell
console
- the same Console instance that was passed to execute()public boolean waitFor(Console console)
waitFor
in class Shell
console
- the same Console instance that was passed to execute()
public void endOfFile(Console console)
endOfFile
in class Shell
console
- The consolepublic void detach(Console console)
detach
in class Shell
console
- The consolepublic Shell.CompletionInfo getCompletions(Console console, java.lang.String command)
getCompletions
in class Shell
console
- The console instancecommand
- The commandpublic java.lang.String getVariableValue(org.gjt.sp.jedit.View view, java.lang.String varName)
public java.util.Hashtable<java.lang.String,java.lang.String> getAliases()
public void waiting(org.gjt.sp.util.Task task)
waiting
in interface org.gjt.sp.util.TaskListener
public void running(org.gjt.sp.util.Task task)
running
in interface org.gjt.sp.util.TaskListener
public void done(org.gjt.sp.util.Task task)
done
in interface org.gjt.sp.util.TaskListener
public void maximumUpdated(org.gjt.sp.util.Task task)
maximumUpdated
in interface org.gjt.sp.util.TaskListener
public void valueUpdated(org.gjt.sp.util.Task task)
valueUpdated
in interface org.gjt.sp.util.TaskListener
public void statusUpdated(org.gjt.sp.util.Task task)
statusUpdated
in interface org.gjt.sp.util.TaskListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |