Chapter 16.  Introducing the Plugin API

The jEdit Plugin API provides a framework for hosting plugin applications without imposing any requirements on the design or function of the plugin itself. You could write a application that performs spell checking, displays a clock or plays chess and turn it into a jEdit plugin. There are currently over 50 released plugins for jEdit. While none of them play chess, they perform a wide variety of editing and file management tasks. A detailed listing of available plugins is available at the jEdit Plugin Central web site. You can also find beta versions of new plugins in the "Downloads" area of the jEdit Community site.

Using the "Plugin Manager" feature of jEdit, users with an Internet connection can check for new or updated plugins and install and remove them without leaving jEdit. See Chapter 8 for details.

In order to "plug in" to jEdit, a plugin must implement interfaces or data that deal with the following matters:

As noted, many of these features are optional; it is possible to write a plugin that does not provide actions, configuration options, or dockable windows. The majority of plugins, however, provide most of these services.

In the following chapters, we will begin by briefly describing jEdit's host capabilities, which includes the loading and display of plugins. Next we will describe the principal classes and data structures that a plugin must implement. Finally, we will outline the building of a modest plugin, "QuickNotepad", that illustrates the requirements and some of the techniques of jEdit plugin design.