|
|||||||||
| 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<java.lang.String> args)
|
void |
executeInDir(Console console,
java.lang.String input,
Output output,
Output error,
java.lang.String command,
java.lang.String dir)
|
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, toString, 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 Shellpublic void closeConsole(Console console)
closeConsole in class Shellpublic void printInfoMessage(Output output)
Shell
printInfoMessage in class Shelloutput - The output
public void printPrompt(Console console,
Output output)
printPrompt in class Shelloutput - The outputconsole - The console instance
public void executeBuiltIn(Console console,
Output output,
Output error,
java.lang.String command,
java.util.Vector<java.lang.String> args)
public void executeInDir(Console console,
java.lang.String input,
Output output,
Output error,
java.lang.String command,
java.lang.String dir)
public void execute(Console console,
java.lang.String input,
Output output,
Output error,
java.lang.String command)
Shell
execute in class Shellconsole - 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 Shellconsole - the same Console instance that was passed to execute()public boolean waitFor(Console console)
waitFor in class Shellconsole - the same Console instance that was passed to execute()
public void endOfFile(Console console)
endOfFile in class Shellconsole - The consolepublic void detach(Console console)
detach in class Shellconsole - The console
public Shell.CompletionInfo getCompletions(Console console,
java.lang.String command)
getCompletions in class Shellconsole - The console instancecommand - The command
public 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 | ||||||||