Imposing a Fixed Set of Global Preferences
You may want to impose a fixed set of global options to be used by all end-users who install the plugin. The GlobalOptionsStorage API provides the ability to set the following:
-
Set a certain global option to a certain value: (https://www.oxygenxml.com/InstData/Editor/SDK/javadoc/ro/sync/exml/workspace/api/options/GlobalOptionsStorage.html#setGlobalObjectProperty-java.lang.String-java.lang.Object-) The APIAccessibleOptionTags interface contains a list with all keys that can be set to a custom value.
-
Set global options by importing an options XML file: (https://www.oxygenxml.com/InstData/Editor/SDK/javadoc/ro/sync/exml/workspace/api/options/GlobalOptionsStorage.html#importGlobalOptions-java.io.File-) Such an options XML file can be generated by using the Options->Export Global Options action in Oxygen XML Author. A sample JavaScript-based WorkspaceAccess plugin implementation that imports such an options XML document into the application can be found here: https://github.com/oxygenxml/wsaccess-javascript-sample-plugins/tree/master/impose-options.
Other ways to share a common set of options with others are listed here: https://blog.oxygenxml.com/topics/sharingSettings.html.