The Property Files

jEdit maintains a list of properties, which are name/value pairs used to store human-readable strings, user settings, and various other forms of meta-data. During startup, jEdit loads the default set of properties, followed by plugin properties stored in plugin JAR files, finally followed by user properties.

Some properties are used by the plugin API itself. Others are accessed by the plugin using methods in the jEdit class. Others are accessed by the scripts used by plugin packagers [3].

Property files contained in plugin JARs must end with the filename extension .props, and have a very simple syntax, which the following example illustrates:

# Lines starting with '#' are ignored.
name=value value property value, split over \
    several lines and tabs can be inserted \
    using the \t and \n escapes backslash can be inserted by writing \\.

Now we look at a fragment from the QuickNotepad.props file [4] which contains properties for the QuickNotepad plugin. The first type of property data is information about the plugin itself; these are the only properties that must be specified in order for the plugin to load:

# general plugin information
plugin.QuickNotepadPlugin.usePluginHome=true Gellene
# depends on jEdit 4.5
plugin.QuickNotepadPlugin.description=A demo jEdit plugin that provides a notepad dockable.

These properties are each described in detail in the documentation for the EditPlugin class and do not require further discussion here.

Next in the file comes a property that sets the title of the plugin's dockable window. Dockable windows are discussed in detail in the section called “The dockables.xml Window Catalog”.

# dockable window name

Next, we see menu item labels for the plugin's actions. All of these but the first are defined in actions.xml file, and that is because the dockable itself has its own actions. Actions are discussed further in the section called “The Actions.xml Catalog”.

# action labels
# Dockable label
# Additional strings extracted from the plugin java source
quicknotepad.choose-file.label=Choose notepad file notepad file
quicknotepad.copy-to-buffer.label=Copy notepad to buffer

Next, the plugin's menu is defined. See the section called “The QuickNotepadPlugin Class”.

# application menu items - quicknotepad.choose-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

The menu item 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.choose-file.title=Choose a notepad file
options.quicknotepad.choose-font=Font: notepad file path

# Initial default font settings

# Setting not defined but supplied for completeness


There is a SideKick for Property files, provided in the JavaSideKick plugin. This gives you a compact and sorted tree view of property files.

Localization Files

In addition to property files ending in .props, you will find property files with the names like Each of these files provides localized strings for a particular locale. In the example above, it is for the German locale. These files are loaded by jEdit automatically when that locale is in use. They need to have a different filename extension from the other property files so they can be treated differently from the regular properties.

[3] See the Macros/Properties/Create Plugin Announcement macro for an example.

[4] Examine the actual file for a more complete example