Workspace Access Plugin

This plugin type allows the developer to contribute actions to the application main menu and toolbars, to create custom views and to interact with the application workspace

Many complex integrations, like integrations with Content Management Systems (CMS) usually requires access to some workspace resources like the toolbar, menus and to the opened XML editors. This type of plugin is also useful because it allows you to make modifications to an opened editor's XML content.

The plugin must implement the interface ro.sync.exml.plugin.workspace.WorkspaceAccessPluginExtension. The callback method applicationStarted of this interface allows access to a parameter of type ro.sync.exml.workspace.api.standalone.StandalonePluginWorkspace which in its turn allows for API access to the application workspace.

The interface StandalonePluginWorkspace has three methods which can be called in order to customize the toolbars, menus and views:

Access to the opened editors can be done first by getting access to all URLs opened in the workspace using the API method StandalonePluginWorkspace.getAllEditorLocations(int editingArea). There are two available editing areas: the DITA Maps Manager editing area (available only in the Oxygen XML Editor and Oxygen XML Author products) where only DITA Maps are edited and the main editing area. Using the URL of an opened resource you can gain access to it using the StandalonePluginWorkspace.getEditorAccess(URL location, int editingArea) API method. A ro.sync.exml.workspace.api.editor.WSEditor allows then access to the current editing page. Special editing API is supported only for the Text (ro.sync.exml.workspace.api.editor.page.text.WSTextEditorPage) page.

In order to be notified when editors are opened, selected and closed you can use the API method StandalonePluginWorkspace.addEditorChangeListener to add a listener.