Page 1 of 1

add options page from js workspace access plugin

Posted: Mon Dec 17, 2018 1:59 pm
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

Re: add options page from js workspace access plugin

Posted: Tue Dec 18, 2018 11:33 am
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

Re: add options page from js workspace access plugin

Posted: Fri Dec 21, 2018 1:24 am
by bk-one
thanks a lot :)