Chapter 7. Extending the Console plugin

Table of Contents

To add a shell to the console, a plugin must specify that it requires the Console plugin, and register a Shell implementation in the plugin's start() method.

Note

All console classes mentioned in this chapter are contained in the console package. So you should add an import statement like the following to the start of your plugin's source file(s):

import console.*;

Specifying dependencies

In order to give the user a helpful error message if the Console plugin is not installed, your plugin should specify dependency properties. If your plugin's core class is named MyPlugin, the corresponding dependencies might look like so:

plugin.MyPlugin.depend.0=jedit 04.00.08.00
plugin.MyPlugin.depend.2=plugin console.ConsolePlugin 3.2

Note that the current version of the Console plugin requires jEdit 4.0pre8 or later, so your plugin should also require at least that jEdit version. If a newer version of the Console plugin is available, you can specify higher version numbers than in the example above. However, all the API calls in this chapter are guaranteed to work with the above version, so in most cases you shouldn't worry about it.