We have already covered in some detail one of the three types of resources that plugins include with their class files - the user action catalog - and the need for help documentation does not require extended discussion. The remaining resource is the properties file.
The first type of property data is information about the plugin itself. The first few entries from the QuickNotepad plugin's properties file fulfills this requirement:
# general plugin information plugin.QuickNotepadPlugin.name=QuickNotepad plugin.QuickNotepadPlugin.author=John Gellene plugin.QuickNotepadPlugin.version=2.0 plugin.QuickNotepadPlugin.docs=QuickNotepad.html plugin.QuickNotepadPlugin.depend.0=jedit 04.00.01.00 |
These properties are described in detail in the section called "Plugin Properties" and do not require further discussion here.
Next in the file comes a property that sets the title of the plugin in docked or frame windows. The use of the suffix .title in the property's key name is required by the plugin API.
# dockable window name quicknotepad.title=QuickNotepad |
The next sections, consisting of the action label and menu item properties, have been discussed earlier in the section called "Action Labels and Menu Items".
# action labels quicknotepad.toggle.label=QuickNotepad quicknotepad-to-front.label=Bring QuickNotepad to front quicknotepad.choose-file.label=Choose notepad file quicknotepad.save-file.label=Save notepad file quicknotepad.copy-to-buffer.label=Copy notepad to buffer # application menu items quicknotepad.menu=quicknotepad.toggle - quicknotepad.choose-file \ quicknotepad.save-file quicknotepad.copy-to-buffer |
We have created a small toolbar as a component of QuickNotepad, so file names for the button icons follow:
# plugin toolbar buttons quicknotepad.choose-file.icon=Open.gif quicknotepad.save-file.icon=Save.gif quicknotepad.copy-to-buffer.icon=Edit.gif |
The menu labels corresponding to these icons will also serve as tooltip text.
Finally, the properties file set forth the labels and settings used by the option pane:
# Option pane labels options.quicknotepad.label=QuickNotepad options.quicknotepad.file=File: options.quicknotepad.choose-file=Choose options.quicknotepad.choose-file.title=Choose a notepad file options.quicknotepad.choose-font=Font: options.quicknotepad.show-filepath.title=Display notepad file path # Initial default font settings options.quicknotepad.show-filepath=true options.quicknotepad.font=Monospaced options.quicknotepad.fontstyle=0 options.quicknotepad.fontsize=14 # Setting not defined but supplied for completeness options.quicknotepad.filepath= |
We do not define a default setting for the filepath property because of differences among operating systems. We will define a default file programatically that will reside in the directory jEdit designates for user settings.