General configuration of an Oxygen XML Author plugin

The Oxygen XML Author functionality can be extended with plugins that implement a clearly specified API. A plugin includes at least a descriptor file which is an XML file called plugin.xml and two Java classes that extend ro.sync.exml.plugin.Plugin and ro.sync.exml.plugin.PluginExtension. Most plugins work only in the Text mode of the XML editor panel while others work at the workspace level. For extending the Author mode of the XML editor panel, see Author Developer Guide for the custom Author actions API.

On the Oxygen XML Author website there is a plugin development kit with some sample plugins (source code and compiled code) and the Javadoc API necessary for developing custom plugins.

The minimal implementation of a plugin must provide:

A ro.sync.exml.plugin.PluginDescriptor object is passed to the constructor of the subclass of the ro.sync.exml.plugin.Plugin class. It contains the following data items about the plugin:

The ro.sync.exml.plugin.PluginDescriptor fields are filled with information from the plugin descriptor file.

The plugin descriptor is an XML file that defines how the plugin is integrated in Oxygen XML Author and what libraries are loaded. The structure of the plugin descriptor file is fully described in a DTD grammar located in OXYGEN_INSTALLATION_FOLDER/plugins/plugin.dtd. Here is a sample plugin descriptor used by the Capitalize Lines sample plugin:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plugin SYSTEM "../plugin.dtd">
<plugin
    name="Capitalize Lines"
    description="Capitalize the first character on each line"
    version="1.0.0"
    vendor="SyncRO"
    class="ro.sync.sample.plugin.caplines.CapLinesPlugin">
    <runtime>
        <library name="lib/caplines.jar"/>
    </runtime>
    <extension type="selectionProcessor" 
    class="ro.sync.sample.plugin.caplines.CapLinesPluginExtension" keyboardShortcut="ctrl shift EQUALS"/>
</plugin>

If your plugin is of type Selection, Document or General, and thus contributes an action either to the contextual menu or to the main menu, then you can assign a keyboard shortcut for it. You can use the keyboardShortcut attribute for each extension element to specify the desired shortcut.

Tip: To compose string representations of the desired shortcut keys you can go to the Oxygen XML Author Menu Shortcut Keys preferences page, press Edit on any action, press the desired key sequence and use the representation which appears in the edit dialog.