The Output interface consists of the following three methods:
public void write
( | color, | |
color, | ||
msg) ; |
This method writes a string to the output instance in question. Note that not all outputs support color - those that don't just ignore the color
parameter.
public void print
( | color, | |
color, | ||
msg) ; |
This method writes a string, followed by a newline.
public void commandDone
(
void)
;
Your shell should call this when a command has finished executing. The console window's implementation of this method stops the little animation.
In your own plugin, it is normally not necessary to extend or instantiate Outputs. Normally, plugins just use the instance passed to Shell.exec().
The Console maintains a shellStateMap, a 1:1 mapping of shell names to Console.ShellState instances. Console.ShellState is a concrete instance of Output which stores the Console's scrollback buffer. This is what gets passed to exec().
When you call console.setShell(String name), the shellState for that shell is automatically created and set. If you need an Output instance for a specific shell, from another part of your plugin, you can call console.getOutput() immediately after console.setShell().