Chapter 10. Developing Plugins

Table of Contents
General Structure of a Plugin
The EditPlugin Class
Plugin Properties
Plugin Documentation
Plugin Dependencies
Plugin Actions
The Plugins Menu
The Global Options Dialog Box
Useful UI Methods
The Activity Log
The EditBus

This chapter overviews jEdit plugin development. A knowledge of Java, Swing, and JDK tools (javac, jar, and so on) is assumed. This chapter only covers the most frequently used jEdit APIs and services; you will still need to study the source of a few other plugins, and possibly jEdit itself, to write a good plugin.

This section is under construction; more is still to come.

General Structure of a Plugin

A plugin is a JAR (Java Archive) file that adds to or modifies jEdit's functionality. The JAR file can contain class files, property files (more on that later), or any other file type, such as images, and so on.

jEdit handles the loading of property and class files from JARs automatically, but other file types such as images can be fetched using the standard Class.getResource() method.

Plugins can use classes loaded from other plugins; for example, the "EditBus" plugin provides enhanced communication services, which other plugins can use.