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
Fields Modifier and Type Field Description static int
DITA_MAPS_EDITING_AREA
The DITA Maps editing areastatic int
MAIN_EDITING_AREA
The main editing area in Oxygen
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
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
addBatchOperationsListener(BatchOperationsListener listener)
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).AuthorDocumentProvider
createAuthorDocumentProvider(java.net.URL systemId, java.io.Reader documentReader)
Creates a provider for a given resource specified by URL and/or Reader.AuthorDocumentProvider
createAuthorDocumentProvider(java.net.URL systemId, java.io.Reader documentReader, boolean expandReferences)
Creates a provider for a given resource specified by URL and/or Reader.java.net.URL[]
getAllEditorLocations(int editingArea)
Get all the editor locations.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.CompareUtilAccess
getCompareUtilAccess()
Access to Comparison utilities.WSEditor
getCurrentEditorAccess(int editingArea)
Get access to the current selected editor.WSEditor
getEditorAccess(java.net.URL location, int editingArea)
Find an editor access by locationWSEditorChangeListener[]
getEditorChangeListeners(int editingArea)
Return a list with all registered editor changed listeners, nevernull
.WSOptionsStorage
getOptionsStorage()
This interface can be used to save and persist in the Oxygen preferences user-defined keys and values.ResultsManager
getResultsManager()
Get the results manager, that can be used to present operation results to the user inside a dedicated view.UtilAccess
getUtilAccess()
Get access to utility methods.ValidationUtilAccess
getValidationUtilAccess()
Get access to validation utilities.XMLUtilAccess
getXMLUtilAccess()
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
removeBatchOperationsListener(BatchOperationsListener listener)
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 Detail
-
MAIN_EDITING_AREA
static final int MAIN_EDITING_AREA
The main editing area in Oxygen- See Also:
- Constant Field Values
-
DITA_MAPS_EDITING_AREA
static final int DITA_MAPS_EDITING_AREA
The DITA Maps editing area- See Also:
- Constant Field Values
-
-
Method Detail
-
getAllEditorLocations
java.net.URL[] getAllEditorLocations(int editingArea)
Get all the editor locations.- 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
WSEditor getEditorAccess(java.net.URL location, int editingArea)
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
WSEditor getCurrentEditorAccess(int editingArea)
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
void addEditorChangeListener(WSEditorChangeListener editorListener, int editingArea)
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
void removeEditorChangeListener(WSEditorChangeListener editorListener, int editingArea)
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
WSEditorChangeListener[] getEditorChangeListeners(int editingArea)
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
void setDITAKeyDefinitionManager(KeyDefinitionManager keyDefitionManager)
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
void 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.- 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
void addBatchOperationsListener(BatchOperationsListener listener)
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
void removeBatchOperationsListener(BatchOperationsListener listener)
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
*********************************
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.
-
createAuthorDocumentProvider
AuthorDocumentProvider createAuthorDocumentProvider(java.net.URL systemId, java.io.Reader documentReader) throws java.io.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:
java.io.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(java.net.URL systemId, java.io.Reader documentReader, boolean expandReferences) throws java.io.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:
java.io.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
-
-