We have already outlined the contents of the user action catalog, the properties file and the documentation file in our earlier discussion. The final step is to compile the source file and build the archive file that will hold the class files and the plugin's other resources.
Publicly released plugins include with their source a makefile
in XML format for the Ant utility. The format for this file requires few changes from plugin to plugin. Here is the version of build.xml
used by QuickNotepad:
<project name="QuickNotepad" default="build"> <description> This is an ant build.xml file for building the QuickNotepad plugin for jEdit. </description> <import file="../../build-support/plugin-build.xml" /> </project>
This build file imports another modular build file, plugin-build.xml
included in the jEdit
source tree, after jEdit 4.3pre5. It can be checked out individually, or found online in the jEdit's SVN repository. It contains common build steps
for jEdit plugins, and some example properties files which you can adapt for use with your plugin.
Customizing this build file for a different plugin will likely only require three changes:
the name of the project
the dependencies of the plugin
The extra files that need to be copied into the jar.
For a full discussion of the Ant
file format and command syntax, you should consult the Ant
documentation, also available through jEdit's help system if you installed the Ant Plugin. Further, the XML plugin gives you completion for both elements and attributes when editing ANT files. The Console plugin provides you with an ANT button which you can bind to keyboard actions. Then, of course, there are the AntFarm and Antelope plugins which also proivde you with alternate means to execute Ant targets through the Console.