add options page from js workspace access plugin

Post here questions and problems related to oXygen frameworks/document types.
bk-one
Posts: 13
Joined: Mon Oct 23, 2017 3:42 pm

add options page from js workspace access plugin

Post by bk-one »

hi, i'm working on a js wsaccess plugin and i would like to add a preference page allowing users to store their plugin settings.
do i need a second plugin based on the Option Page Plugin Extension interface or can i create the preference page in my wsaccess.js?

best wishes,
barbara
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: add options page from js workspace access plugin

Post by Radu »

Hi Barbara,

The Preferences page extension point needs to be Java based.
But you can have a single plugin which adds both the Java-based preferences page and the Javascript-based workspace access plugin.
Basically your plugin.xml would look like this:

Code: Select all

<plugin
id="..."
name="..."
description="..."
version="1.0"
vendor="Syncro Soft"
class="ro.sync.exml.plugin.Plugin"
classLoaderType="preferReferencedResources">
<runtime>
<library name="lib/optionPageImpl.jar"/>
</runtime>
<extension type="WorkspaceAccessJS" href="wsAccess.js"/>
<extension type="OptionPage" class="my.pack.CustomOptionPagePluginExtension"/>
</plugin>
https://www.oxygenxml.com/doc/versions/ ... lugin.html

An example of a plugin which implements such an options page extension can be found here:

https://github.com/oxygenxml/oxygen-dita-prolog-updater

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bk-one
Posts: 13
Joined: Mon Oct 23, 2017 3:42 pm

Re: add options page from js workspace access plugin

Post by bk-one »

thanks a lot :)
Post Reply