The jEdit plugin API uses BeanShell to create the top-level visible container
of a plugin's interface. The BeanShell code is contained in a file named
dockables.xml
. It usually is quite short, providing only
a single BeanShell expression used to create a visible plugin window.
The following example from the QuickNotepad plugin illustrates the requirements of the data file:
<?xml version="1.0"?> <!DOCTYPE DOCKABLES SYSTEM "dockables.dtd"> <DOCKABLES> <DOCKABLE NAME="quicknotepad"> new QuickNotepad(view, position); </DOCKABLE> </DOCKABLES>
In this example, the <DOCKABLE>
element has
a single attribute, the dockable window's identifier. This attribute is
used to key a property where the window title is stored; see
the section called “The Property File”.
The contents of the <DOCKABLE>
element itself is a
BeanShell expression that constructs a new QuickNotepad
object. The view
and position
are
predefined by the plugin API as the view in which the plugin window will reside,
and the docking position of the plugin.
A formal description of each element of the
dockables.xml
file can be found in the
documentation of the
DockableWindowManager
class.