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

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: 6381
Joined: Fri Jul 09, 2004 5:18 pm

Re: add options page from js workspace access plugin

Post by Radu » Tue Dec 18, 2018 11:33 am

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 » Fri Dec 21, 2018 1:24 am

thanks a lot :)

Post Reply