Edit online

Components Validation Plugin Extension

This type of plugin allows you to customize the menus, toolbars, and other components by enabling or filtering them from the user interface.

This plugin provides the following API:

ComponentsValidatorPluginExtension interface

There is one method that must be implemented:

getComponentsValidator()
Returns a ro.sync.exml.ComponentsValidator implementation class used for validating the menus, toolbars, and their actions.
ComponentsValidator interface

Provides methods to filter various features from being added to the GUI of Oxygen XML Editor:

validateMenuOrTaggedAction(String[] menuOrActionPath)
Checks if a menu or a tag action from a menu is allowed and returns a boolean value. A tag is used to uniquely identifying an action. The String[] argument is the tag of the menu / action and the tags of its parent menus if any.
validateToolbarTaggedAction(String[] toolbarOrAction)
Checks if an action from a toolbar is allowed and returns a boolean value. The String[] argument is the tag of the action from a toolbar and the tag of its parent toolbar if any.
validateComponent(String key)
Checks if the given component is allowed and returns a boolean value. The String argument is the tag identifying the component. You can remove toolbars entirely using this callback.
validateAccelAction(String category, String tag)
Checks if the given accelerator action is allowed to appear in the GUI and returns a boolean value. An accelerator action can be uniquely identified so it will be removed both from toolbars or menus. The first argument represents the action category, the second is the tag of the action.
validateContentType(String contentType)
Checks if the given content type is allowed and returns a boolean value. The String argument represents the content type. You can instruct Oxygen XML Editor to ignore content types such as text / xsl or text / xquery.
validateOptionPane(String optionPaneKey)
Checks if the given options page can be added in the preferences option tree and returns a boolean value. The String argument is the option pane key.
validateOption(String optionKey)
Checks if the given option can be added in the option page and returns a boolean value. The String argument is the option key. This method is mostly used for internal use and it is not called for each option in a preferences page.
validateLibrary(String library)
Checks if the given library is allowed to appear listed in the About dialog box and returns a boolean value. The String argument is the library. This method is mostly for internal use.
validateNewEditorTemplate(EditorTemplate editorTemplate)
Checks if the given template for a new editor is allowed and returns a boolean value. The EditorTemplate argument is the editor template. An EditorTemplate is used to create an editor for a given extension. You can thus filter what appears in the list of the New dialog box.
isDebuggerperspectiveAllowed()
Checks if the debugger perspective is allowed and returns a boolean value.
validateSHMarker(String marker)
Checks if the given marker is allowed and returns a boolean value. The String argument represents the syntax highlight marker to be checked. If you decide to filter certain content types, you can also filter the syntax highlight options so that the content type is no longer present in the Preferences options tree.
validateToolbarComposite(String toolbarCompositeTag)
Checks if the toolbar composite is available. A toolbar composite is a toolbar component such as a drop-down menu.
Tip: The best way to decide what to filter is to observe the values that Oxygen XML Editor passes when these callbacks are called. You have to create an implementation for this interface that lists in the console all values received by each function. Then you can decide on the values to filter and act accordingly.