Plugin Dependencies

You can use plugin dependencies to prevent your plugin from loading on versions of jEdit and the JDK earlier than you specify. This should be used if your plugin uses features specific to those versions, to prevent people with older software from seeing endless streams of exceptions.

Before a plugin is loaded, jEdit checks any dependency properties defined by the plugin. These properties are named plugin.plugin.depend.n, where plugin is the class name of your EditPlugin implementation, and n is an index. The indexing of the dependencies must start at 0 and be consecutive.

To add a dependency for a specific JDK version, specify "jdk", followed by a version number as the value of a dependency property. To depend on a specific jEdit release, specify "jedit" followed by the build number. The build number of a jEdit release can be found in the org/gjt/sp/jedit/jEdit.java file. To depend on a specific plugin release, specify "plugin" followed by the plugin name and version number.

Here is a typical example for a plugin that requires jEdit 2.2final or later:

plugin.HelloWorldPlugin.depend.0=jedit 02.02.99.00

And here is a more complicated example for a plugin that needs Java 2, jEdit 2.3pre5, and EditBus 0.9.1:

plugin.BazPlugin.depend.0=jdk 1.2
plugin.BazPlugin.depend.1=jedit 02.03.05.00
plugin.BazPlugin.depend.2=plugin EditBusPlugin 0.9.1

How do you know exactly which jEdit version your plugin requires? To be on the safe side, you should just specify the jEdit version you developed the plugin with. You should also test the plugin with a few older releases.