[oXygen-sdk] Use ComponentsValidatorPluginExtension only when Oxygen Author?

Tony Graham tony at antennahouse.com
Tue Jul 2 09:35:48 CDT 2019


I have taken on a project with a plugin that adds a menu but also
disables selected menu items and the XSLT Debugger perspective, among
other things.

The end users will use Oxygen Author, but the project's developers use
Oxygen Editor.  They now want to use Oxygen Editor with the plug-in's
menu added but without any of the other menu items being removed.

Is there a way to fall back to using Oxygen's default components
validator (which, presumably, doesn't disable anything) but only when
the plug-in is run from Oxygen Editor?

Somewhat separately, my attempt to get the StandalonePluginWorkspace to
work out whether or not the application is Oxygen Editor is currently
failing with a NullPointerException (see below) when I use
'pluginWorkspace'.  Any ideas?

Regards,


Tony Graham.
-- 
XML Division
Antenna House, Inc.
tony at antennahouse.com


public class ComponentsValidatorPluginExtension
     implements 
ro.sync.exml.plugin.startup.ComponentsValidatorPluginExtension {

...

   @Override
   public ComponentsValidator getComponentsValidator() {

     StandalonePluginWorkspace pluginWorkspace = 
(StandalonePluginWorkspace) PluginWorkspaceProvider.getPluginWorkspace();
     boolean   isEditor = pluginWorkspace.getApplicationType() == 
ApplicationType.XML_EDITOR;

     return new ComponentsValidator() {
       ...



More information about the oXygen-sdk mailing list