|
|||||||||
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 |
closeConsole(Console console)
Called when a Console dockable is closed. |
void |
detach(Console console)
Detaches the currently running process. |
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 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)
|
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 |
stop(Console console)
Stops the currently executing command, if any. |
boolean |
waitFor(Console console)
Waits for currently running Console processes to finish execution. |
Methods inherited from class console.Shell |
---|
execute, getName, getShell, getShellNames, registerShell, toString, unregisterShell, waitUntilDone |
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 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 args)
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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |