Page 1 of 1

Plugin - JavaScript Demo Works?

Posted: Wed Jan 18, 2017 10:11 pm
by jlpoole
I'm recreating the example plugin at ... in-js.html

I copied the content from the examples into two files, plugin.xml, and msAcess.js, and placed the files in my Oxygen plugins folder.

I launched Oxygen from a DOS console (so I might see any System.out.println or error output), selected the example flowers.ditamap and then looked for the "Run notepad" in two windows. I did not see any output in my DOS console indicating that the plugin had loaded, nor was I able to see the menu item, "Run notepad", that should have added.

What do I need to do to have the plugins activated?

My version of Oxygen:

Showing the files in the plugins directory:

Depicting the right click pop-up menu in the ditamap views:

Re: Plugin - JavaScript Demo Works?

Posted: Thu Jan 19, 2017 9:28 am
by Radu

In the Oxygen "plugins" folder you should create another folder called for example something like "myPlugin" in which the plugin.xml and all other resources are located.
Here's a github project which contains various workspace access plugin samples, maybe it will help you see other examples as well: ... le-plugins

Oh, and we will update our documentation to explain more properly the need for a plugin-specific folder inside the plugins folder.


Re: Plugin - JavaScript Demo Works?

Posted: Thu Jan 19, 2017 3:28 pm
by jlpoole
Thank you, your instructions worked.

I created a subfolder "radu", to wit: C:\Program Files\Oxygen XML Editor 18\plugins\radu, and moved the two files plugin.xml and msAcess.js, into the "radu" folder and then launched Oxygen from the command line. The "run notepad" now displays in the right-click pop-up menu.

Here's session output:

Code: Select all

C:\Program Files\Oxygen XML Editor 18>oxygen.bat
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Application started ro.sync.exml.workspace.b.c.k@e62319f
0 WARN [ main ] ro.sync.exml.project.c - Could not load the last project No scenario in specified file.

running file:/C:/Users/jlpoole/Documents/OxygenXMLEditor/samples/dita/flowers/flowers.ditamap
5253 WARN [ AuthorExtensionBuilder ] ro.sync.ecss.extensions.g - Actions update state took too long, checkOffset 29 in file:/C:/Users/jlpoole/Documents/OxygenXM
RIGHT CLICKro.sync.ecss.component.ui.f.b.t[,0,0,0x0,invalid,layout=javax.swing.plaf.basic.DefaultMenuLayout,alignmentX=0.0,alignmentY=0.0,border=javax.swing.pla
Computed absolute reference file:/C:/Users/jlpoole/Documents/OxygenXMLEditor/samples/dita/flowers/topics/flowers/snowdrop.dita
Application closing ro.sync.exml.workspace.b.c.k@e62319f

C:\Program Files\Oxygen XML Editor 18>
This issue is now resolved. Thank you.

Re: Plugin - JavaScript Demo Works?

Posted: Thu Jan 19, 2017 3:33 pm
by Radu
Hi John,

Great. Once you have a stable plugin and want to share it with others, the procedure is this one: ... ddons.html

because most people might not have admin privileges to create folders in the Windows program files area.
Or you can instruct users to install Oxygen in a place (user home for example) with full read/write access allowed to all applications.