Package ro.sync.exml.workspace.api
Interface PluginWorkspace
- All Superinterfaces:
ApplicationInformationAccess
,ColorThemeUtilities
,GlobalOptionsStorage
,ReferencesCustomizer
,Workspace
,WorkspaceUtilities
- All Known Subinterfaces:
EclipsePluginWorkspace
,StandalonePluginWorkspace
,WebappPluginWorkspace
@API(type=NOT_EXTENDABLE,
src=PUBLIC)
public interface PluginWorkspace
extends Workspace, ReferencesCustomizer, GlobalOptionsStorage
Access the entire workspace of Oxygen.
- Since:
- 11.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The DITA Maps editing areastatic final int
The main editing area in Oxygen -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAuthorCSSAlternativesCustomizer
(AuthorCSSAlternativesCustomizer cssAlternativesCustomizer) Add a customizer for the CSS alternatives which the user can choose in the Styles drop-down button when working in the Author visual editing mode.void
Add a batch operations listener, listener notified before and after large modification operations start in Oxygen, for example when the Replace All in Files is started.void
addEditorChangeListener
(WSEditorChangeListener editorListener, int editingArea) Add listener for editor related events(for example editor opened, closed, page changed).createAuthorDocumentProvider
(URL systemId, Reader documentReader) Creates a provider for a given resource specified by URL and/or Reader.createAuthorDocumentProvider
(URL systemId, Reader documentReader, boolean expandReferences) Creates a provider for a given resource specified by URL and/or Reader.URL[]
getAllEditorLocations
(int editingArea) Get all the editor locations.
Based on its settings, the application may choose not to fully load documents in the editor tabs until the user switches to them.Get access to a wrapper which notifies all batch operation listeners registered using the "addBatchOperationsListener" API if a third party plugin intends to make batch changes to a set of resources.Access to Comparison utilities.Creates a components provider for editors.getCurrentEditorAccess
(int editingArea) Get access to the current selected editor.getEditorAccess
(URL location, int editingArea) Find an editor access by locationgetEditorChangeListeners
(int editingArea) Return a list with all registered editor changed listeners, nevernull
.This interface can be used to save and persist in the Oxygen preferences user-defined keys and values.Get the results manager, that can be used to present operation results to the user inside a dedicated view.Get access to utility methods.Get access to validation utilities.Access to XML utilities.void
removeAuthorCSSAlternativesCustomizer
(AuthorCSSAlternativesCustomizer cssAlternativesCustomizer) Remove a customizer for the CSS alternatives which the user can choose in the Styles drop-down button when working in the Author visual editing mode.void
Remove a batch operations listener.void
removeEditorChangeListener
(WSEditorChangeListener editorListener, int editingArea) Remove listener for editor related events.void
setDITAKeyDefinitionManager
(KeyDefinitionManager keyDefitionManager) By default key definitions are gathered from DITA Maps opened in the DITA Maps Manager.Methods inherited from interface ro.sync.exml.workspace.api.application.ApplicationInformationAccess
getApplicationName, getApplicationType, getLicenseInformationProvider, getPlatform, getPreferencesDirectory, getUserInterfaceLanguage, getVersion, getVersionBuildID
Methods inherited from interface ro.sync.exml.workspace.api.util.ColorThemeUtilities
getColorTheme, getImageInverter
Methods inherited from interface ro.sync.exml.workspace.api.options.GlobalOptionsStorage
addGlobalOptionListener, deserializePersistentObject, getGlobalObjectProperty, importGlobalOptions, importGlobalOptions, removeGlobalOptionListener, saveGlobalOptions, serializePersistentObject, setGlobalObjectProperty, showPreferencesPages
Methods inherited from interface ro.sync.exml.workspace.api.standalone.ReferencesCustomizer
addInputURLChooserCustomizer, addRelativeReferencesResolver
Methods inherited from interface ro.sync.exml.workspace.api.Workspace
close, closeAll, createNewEditor, createNewEditor, delete, isStandalone, open, open, open, refreshInProject, saveAll, setParentFrameTitle
Methods inherited from interface ro.sync.exml.workspace.api.WorkspaceUtilities
chooseDirectory, chooseDirectory, chooseFile, chooseFile, chooseFile, chooseFiles, chooseURL, chooseURL, chooseURL, chooseURLPath, chooseURLPath, clearImageCache, createJavaProcess, createProcess, getDataSourceAccess, getImageUtilities, getParentFrame, getTemplateManager, openInExternalApplication, openInExternalApplication, openInExternalApplication, showConfirmDialog, showConfirmDialog, showErrorMessage, showErrorMessage, showInformationMessage, showStatusMessage, showStatusMessage, showWarningDialog, showWarningDialog, showWarningMessage, startProcess
-
Field Details
-
MAIN_EDITING_AREA
static final int MAIN_EDITING_AREAThe main editing area in Oxygen- See Also:
-
DITA_MAPS_EDITING_AREA
static final int DITA_MAPS_EDITING_AREAThe DITA Maps editing area- See Also:
-
-
Method Details
-
getAllEditorLocations
Get all the editor locations.
Based on its settings, the application may choose not to fully load documents in the editor tabs until the user switches to them. In such cases the URLs for these not yet instantiated editors are not returned by this method.- Parameters:
editingArea
- One of the constants in this class:
MAIN_EDITING_AREA
- for the editors in the main Oxygen workspace area.
DITA_MAPS_EDITING_AREA
- for the editors in the DITA Maps Manager view workspace area.- Returns:
- All the editor locations or empty array if no editor is opened
-
getEditorAccess
Find an editor access by location- Parameters:
location
- The editor locationeditingArea
- One of the constants in this class:
MAIN_EDITING_AREA
- for the editors in the main Oxygen workspace area.
DITA_MAPS_EDITING_AREA
- for the editors in the DITA Maps Manager view workspace area.- Returns:
- access to the found editor or
null
if no editor found with that location URL.
-
getCurrentEditorAccess
Get access to the current selected editor.- Parameters:
editingArea
- One of the constants in this class:
MAIN_EDITING_AREA
- for the editors in the main Oxygen workspace area.
DITA_MAPS_EDITING_AREA
- for the editors in the DITA Maps Manager view workspace area.- Returns:
- access to the current editor or
null
if no editor is opened.
-
getXMLUtilAccess
XMLUtilAccess getXMLUtilAccess()Access to XML utilities.- Returns:
- Access to XML utilities.
-
getCompareUtilAccess
CompareUtilAccess getCompareUtilAccess()Access to Comparison utilities.- Returns:
- Access to comparison utilities.
- Since:
- 19.1
-
getUtilAccess
UtilAccess getUtilAccess()Get access to utility methods.- Returns:
- access to utility methods.
-
getValidationUtilAccess
ValidationUtilAccess getValidationUtilAccess()Get access to validation utilities.- Returns:
- access to validation utility methods.
- Since:
- 25
-
getResultsManager
ResultsManager getResultsManager()Get the results manager, that can be used to present operation results to the user inside a dedicated view.- Returns:
- the results manager.
- Since:
- 19.0
-
addEditorChangeListener
Add listener for editor related events(for example editor opened, closed, page changed).- Parameters:
editorListener
- The listener notified when an editor is added, removed or the editor page is changed.editingArea
- One of the constants in this class:
MAIN_EDITING_AREA
- for the editors in the main Oxygen workspace area.
DITA_MAPS_EDITING_AREA
- for the editors in the DITA Maps Manager view workspace area.
-
removeEditorChangeListener
Remove listener for editor related events.- Parameters:
editingArea
- One of the constants in this class:
MAIN_EDITING_AREA
- for the editors in the main Oxygen workspace area.
DITA_MAPS_EDITING_AREA
- for the editors in the DITA Maps Manager view workspace area.editorListener
- The listener notified when an editor is added, removed or the editor page is changed.
-
getEditorChangeListeners
Return a list with all registered editor changed listeners, nevernull
.- Parameters:
editingArea
- One of the constants in this class:
MAIN_EDITING_AREA
- for the editors in the main Oxygen workspace area.
DITA_MAPS_EDITING_AREA
- for the editors in the DITA Maps Manager view workspace area.- Returns:
- a list with all registered editor changed listeners, never
null
. - Since:
- 16
-
getOptionsStorage
WSOptionsStorage getOptionsStorage()This interface can be used to save and persist in the Oxygen preferences user-defined keys and values. It is also responsible for adding and removing listeners that are notified about the option changes. These keys are common to all plugin implementations.- Returns:
- The object that manages the custom user options stored in the Oxygen preferences from the plugin implementations.
- Since:
- 12.1
-
setDITAKeyDefinitionManager
By default key definitions are gathered from DITA Maps opened in the DITA Maps Manager. This API can be used by the developer to take control over the key definitions which will be used to resolve keyrefs and conkeyrefs for topics opened in the Author page.- Parameters:
keyDefitionManager
- The key definition manager- Since:
- 14
-
addAuthorCSSAlternativesCustomizer
Add a customizer for the CSS alternatives which the user can choose in the Styles drop-down button when working in the Author visual editing mode.- Parameters:
cssAlternativesCustomizer
- The CSS alternatives customizer.- Since:
- 17
-
removeAuthorCSSAlternativesCustomizer
void removeAuthorCSSAlternativesCustomizer(AuthorCSSAlternativesCustomizer cssAlternativesCustomizer) Remove a customizer for the CSS alternatives which the user can choose in the Styles drop-down button when working in the Author visual editing mode.- Parameters:
cssAlternativesCustomizer
- The CSS alternatives customizer.- Since:
- 17
-
addBatchOperationsListener
Add a batch operations listener, listener notified before and after large modification operations start in Oxygen, for example when the Replace All in Files is started. The listener is only called with REPLACE_ALL events for the standalone version of Oxygen.- Parameters:
listener
- The batch operations listener.- Since:
- 18.1
-
removeBatchOperationsListener
Remove a batch operations listener.- Parameters:
listener
- The batch operations listener.- Since:
- 18.1
-
getBatchOperationsListenersAccess
BatchOperationsListener getBatchOperationsListenersAccess()Get access to a wrapper which notifies all batch operation listeners registered using the "addBatchOperationsListener" API if a third party plugin intends to make batch changes to a set of resources.- Returns:
- A BatchOperationsListener wrapper which notifies all BatchOperationsListener listeners added by other plugins using the "addBatchOperationsListener" API method
- Since:
- 26.1
-
createAuthorDocumentProvider
AuthorDocumentProvider createAuthorDocumentProvider(URL systemId, Reader documentReader) throws IOException Creates a provider for a given resource specified by URL and/or Reader. References are not expanded. The provider creates a structure of AuthorNodes and allows it to be manipulated via anAuthorDocumentController
.
Such an API may be useful if you want to load XML content and use Author API to make changes to it. Afterwards you can serialize the structure back to XML.
The parsing of the XML content to Author Nodes is quite fast and may also be used to batch change sets of XML resources by using theAuthorDocumentController
API.- Parameters:
systemId
- The system id of the resource. Ifnull
, the reader must be provided and relative DTD entity references will not be properly resolved.documentReader
- The document reader. Ifnull
, the reader will be created internally.- Returns:
- The provider which gives access to the non-visual
AuthorDocumentController
representation of the resource. - Throws:
IOException
- If any exception occurs during the loading, for example IO exception due to incorrect system id, unsupported encodings, files saving permission, etc- Since:
- 22.1
-
createAuthorDocumentProvider
AuthorDocumentProvider createAuthorDocumentProvider(URL systemId, Reader documentReader, boolean expandReferences) throws IOException Creates a provider for a given resource specified by URL and/or Reader. The provider creates a structure of AuthorNodes and allows it to be manipulated via anAuthorDocumentController
.
Such an API may be useful if you want to load XML content and use Author API to make changes to it. Afterwards you can serialize the structure back to XML.
The parsing of the XML content to Author Nodes is quite fast and may also be used to batch change sets of XML resources by using theAuthorDocumentController
API.- Parameters:
systemId
- The system id of the resource. Ifnull
, the reader must be provided and relative DTD entity references will not be properly resolved.documentReader
- The document reader. Ifnull
, the reader will be created internally.expandReferences
-true
to expand references in the created document.- Returns:
- The provider which gives access to the non-visual
AuthorDocumentController
representation of the resource. - Throws:
IOException
- If any exception occurs during the loading, for example IO exception due to incorrect system id, unsupported encodings, files saving permission, etc- Since:
- 24.0
-
getComponentsProvider
IComponentsProvider getComponentsProvider()Creates a components provider for editors. The provider allows you to obtain the components from an editor.- Returns:
- The provider which gives you access to the editor components.
- Since:
- 27
*********************************
EXPERIMENTAL - Subject to change
********************************
Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.
-