The Output interface

The Output interface consists of the following three methods:

In your own plugin, it is normally not necessary to extend or instantiate Outputs. Normally, plugins just use the instance passed to Shell.exec().

Where does the Output come from?

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().