Option Page Plugin Extension
This type of plugin extension allows you to add custom Preferences pages.
The extension must implement the
ro.sync.exml.plugin.option.OptionPagePluginExtension class. The provided
callbacks allows you to create a custom Swing component that will be added to the
page and to react to various calls to persistently save the page settings using the
OptionsStorage
API.
All preferences pages that are contributed by a plugin are listed in the Preferences dialog box in the Plugins category. As long as the added preferences page has the same name as its plugin, it will be promoted to the first level of the hierarchy within the Plugins category.
<extension type="OptionPage" class="my.pack.CustomOptionPagePluginExtension"/>
Sharing Options Through Project Files
- Override
ro.sync.exml.plugin.option.OptionPagePluginExtension.getProjectLevelOptionKeys()
and return a set of options that need to be saved inside the project. - Install the plugin in an Oxygen XML Editor instance.
- In the Project view, create a project or open an existing one.
- Open the Preferences dialog box .
- Configure the options in each preferences page that you want to be
included in the project file and switch the storage preference to Project Options in each
page.Note: Some pages do not have the Project Options button, since the options they host might contain sensitive data (such as passwords, for example) that is unsuitable for sharing with other users.
-
Click OK and close the Preferences dialog box.
All explicitly set values are now saved in the project file. You can then share the project file so that your team will have the same option configuration that you stored in the project file.Note: The project file extension (.xpr) must be preserved when the file is distributed to others.Notice: When a project is opened for the first time, a confirmation dialog box will be displayed that asks you to confirm that the project came from a trusted source. This is meant to help prevent potential security issues.