Interface StandalonePluginWorkspace
-
- All Superinterfaces:
ApplicationInformationAccess
,ColorThemeUtilities
,DiffAndMergeTools
,GlobalOptionsStorage
,MathFlowConfigurator
,PluginWorkspace
,ReferencesCustomizer
,Workspace
,WorkspaceUtilities
- All Known Subinterfaces:
WebappPluginWorkspace
@API(type=NOT_EXTENDABLE, src=PUBLIC) public interface StandalonePluginWorkspace extends PluginWorkspace, MathFlowConfigurator, DiffAndMergeTools
The Plugin Workspace offers the possibility to customize the Workspace toolbars, menu bars or views, to access utility methods or to access (and add listeners for) all opened editors from the Main editing area or from the DITA Maps editing area.
Each opened editor contains one or more pages.
The current editor page can be accessed trough theWSEditor.getCurrentPage()
method that returns specific editor implementations for Author and Text pages:-
WSAuthorEditorPage
that provides access to Author editor page document controller or change tracking controller -
WSTextEditorPage
that offers access to the edited document.
- Since:
- 11.2
-
-
Field Summary
-
Fields inherited from interface ro.sync.exml.workspace.api.PluginWorkspace
DITA_MAPS_EDITING_AREA, MAIN_EDITING_AREA
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addMenuBarCustomizer(MenuBarCustomizer menuBarCustomizer)
Adds a customizer which can contribute to or modify existing menu components.void
addMenusAndToolbarsContributorCustomizer(MenusAndToolbarsContributorCustomizer customizer)
Add a customizer for menus and toolbars.void
addPluginExtension(java.lang.String extensionType, PluginExtension pluginExtension)
Adds a plug-in extension of a specified type.void
addToolbarComponentsCustomizer(ToolbarComponentsCustomizer componentsCustomizer)
Adds a customizer which can contribute to or modify existing toolbars or contribute to the reserved Plugins toolbar.void
addTopicRefTargetInfoProvider(java.lang.String protocol, TopicRefTargetInfoProvider targetInfoProvider)
Add a target information provider to the DITA Maps Manager view.void
addViewComponentCustomizer(ViewComponentCustomizer viewComponentCustomizer)
Adds a customizer which can contribute to or modify existing views or contribute to the reserved custom view.EditorComponentProvider
createEditorComponentProvider(java.lang.String[] allowedPages, java.lang.String initialPage)
Creates a new editor component.EditorComponentProvider
createEditorComponentProvider(java.lang.String[] allowedPages, java.lang.String initialPage, java.lang.String contentType)
Creates a new editor component.ActionsProvider
getActionsProvider()
Provides access to global actions defined in the application.java.lang.String
getOxygenActionID(javax.swing.Action action)
Get an unique ID (which does not depend on the action name) for an action Oxygen has mounted on the main JMenuBar or on the toolbars.ProjectController
getProjectManager()
Get access to Project related API.ProxyDetailsProvider
getProxyDetailsProvider()
Get access to currently configured network proxy information.PluginResourceBundle
getResourceBundle()
A message bundle that holds all the internationalized messages displayed in all the plugins for a language set in Preferences.void
hideToolbar(java.lang.String toolbarID)
Hide a toolbar specified by the toolbar ID.void
hideView(java.lang.String viewID)
Hide a view specified by the view ID.boolean
isToolbarShowing(java.lang.String toolbarID)
Check if a toolbar is showing or hidden.boolean
isViewAvailable(java.lang.String viewID)
Check if a view with a certain ID is available in the application.boolean
isViewShowing(java.lang.String viewID)
Check if a view is showing or hidden.void
removeMenusAndToolbarsContributorCustomizer(MenusAndToolbarsContributorCustomizer customizer)
Remove a customizer for menus and toolbars.void
showToolbar(java.lang.String toolbarID)
Show a toolbar specified by the toolbar ID.void
showView(java.lang.String viewID, boolean requestFocus)
Show a view specified by the view ID.-
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.standalone.DiffAndMergeTools
openDiffFilesApplication, openDiffFilesApplication, openDiffFilesApplication, openDiffFilesApplication, openMergeApplication, openMergeApplication, openPreviewDialog
-
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.math.MathFlowConfigurator
setMathFlowFixedLicenseFile, setMathFlowFixedLicenseKeyForComposer, setMathFlowFixedLicenseKeyForEditor, setMathFlowInstallationFolder
-
Methods inherited from interface ro.sync.exml.workspace.api.PluginWorkspace
addAuthorCSSAlternativesCustomizer, addBatchOperationsListener, addEditorChangeListener, createAuthorDocumentProvider, createAuthorDocumentProvider, getAllEditorLocations, getBatchOperationsListenersAccess, getCompareUtilAccess, getCurrentEditorAccess, getEditorAccess, getEditorChangeListeners, getOptionsStorage, getResultsManager, getUtilAccess, getValidationUtilAccess, getXMLUtilAccess, removeAuthorCSSAlternativesCustomizer, removeBatchOperationsListener, removeEditorChangeListener, setDITAKeyDefinitionManager
-
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
-
-
-
-
Method Detail
-
addToolbarComponentsCustomizer
void addToolbarComponentsCustomizer(ToolbarComponentsCustomizer componentsCustomizer)
Adds a customizer which can contribute to or modify existing toolbars or contribute to the reserved Plugins toolbar.
IMPORTANT This customizer must be set early, when the plugin extension's applicationStarted method gets called.
NOTICE You will also receive notification for the Author extension toolbars (which are dynamically constructed based on the document type of the current selected XML file). The notifications will be received before the toolbars are constructed after an XML editor which is opened in the Author page was selected. Such toolbar IDs have the prefix "Author_custom_actions" and the suffix is a number depending on how many toolbars were created for that specific document type. In this way you can dynamically filter or add to toolbar buttons already declared in the document type associated to the XML editor.- Parameters:
componentsCustomizer
- The tool bar components customizer.
-
addViewComponentCustomizer
void addViewComponentCustomizer(ViewComponentCustomizer viewComponentCustomizer)
Adds a customizer which can contribute to or modify existing views or contribute to the reserved custom view.
IMPORTANT This customizer must be set early, when the plugin extension's applicationStarted method gets called.- Parameters:
viewComponentCustomizer
- The views component customizer.
-
addMenuBarCustomizer
void addMenuBarCustomizer(MenuBarCustomizer menuBarCustomizer)
Adds a customizer which can contribute to or modify existing menu components.
IMPORTANT This customizer must be set early, when the plugin extension's applicationStarted method gets called.- Parameters:
menuBarCustomizer
- The menu bar components customizer.
-
addTopicRefTargetInfoProvider
void addTopicRefTargetInfoProvider(java.lang.String protocol, TopicRefTargetInfoProvider targetInfoProvider)
Add a target information provider to the DITA Maps Manager view. This method can be used by a CMS implementor to take control over the way Oxygen is gathering information about each topic reference. The protocol is the protocol of the URL of the opened DITA Map. For example when a DITA Map is opened in the DITA Maps Manager view the CMS can get called to compute titles for all topic references instead of the default Oxygen behavior (requesting the entire content for the referenced URL).- Parameters:
protocol
- The custom protocol of the opened DITA Map for which the plugin will compute the topic reference titles and auxiliary information.targetInfoProvider
- Gets called to resolve the title for the topic references in the DITA Map.- Since:
- 12.2
-
showView
void showView(java.lang.String viewID, boolean requestFocus)
Show a view specified by the view ID.
If the view is hidden, this method brings it to front. If the view is in auto-hide state, this method removes its auto-hide state and bring it to front.- Parameters:
viewID
- The view ID.requestFocus
- True to request the focus inside the view after show.- Since:
- 12
-
hideView
void hideView(java.lang.String viewID)
Hide a view specified by the view ID.- Parameters:
viewID
- The view ID.- Since:
- 15
-
isViewShowing
boolean isViewShowing(java.lang.String viewID)
Check if a view is showing or hidden.- Parameters:
viewID
- The view ID.- Returns:
true
if the view is showing- Since:
- 15
-
isViewAvailable
boolean isViewAvailable(java.lang.String viewID)
Check if a view with a certain ID is available in the application.- Parameters:
viewID
- The view ID.- Returns:
true
if the view is available in the application- Since:
- 22
-
hideToolbar
void hideToolbar(java.lang.String toolbarID)
Hide a toolbar specified by the toolbar ID.- Parameters:
toolbarID
- The toolbar ID.- Since:
- 15
-
showToolbar
void showToolbar(java.lang.String toolbarID)
Show a toolbar specified by the toolbar ID. If the toolbar is hidden, this method shows it.- Parameters:
toolbarID
- The toolbar ID. You can install a toolbar component customizer and see all available IDs.- Since:
- 12
-
isToolbarShowing
boolean isToolbarShowing(java.lang.String toolbarID)
Check if a toolbar is showing or hidden.- Parameters:
toolbarID
- The toolbar ID.- Returns:
true
if the toolbar is showing- Since:
- 15
-
getOxygenActionID
java.lang.String getOxygenActionID(javax.swing.Action action)
Get an unique ID (which does not depend on the action name) for an action Oxygen has mounted on the main JMenuBar or on the toolbars. If the action appears on a contextual menu but is not installed on a main menu it will pe prefixed with the constant "ACTION_WITH_NO_SHORTCUT/"- Parameters:
action
- The action for which to retrieve the ID.- Returns:
- The unique ID or
null
if the action is not one provided by Oxygen. - Since:
- 12.2
-
getActionsProvider
ActionsProvider getActionsProvider()
Provides access to global actions defined in the application. It might benull
when called in certain contexts (for example from the webapp application).- Returns:
- access to global actions defined in the application.
- Since:
- 18
-
addMenusAndToolbarsContributorCustomizer
void addMenusAndToolbarsContributorCustomizer(MenusAndToolbarsContributorCustomizer customizer)
Add a customizer for menus and toolbars. It will be notified to customize various menus and toolbars.- Parameters:
customizer
- The customizer which will be notified to customize menus and toolbars.- Since:
- 18
-
removeMenusAndToolbarsContributorCustomizer
void removeMenusAndToolbarsContributorCustomizer(MenusAndToolbarsContributorCustomizer customizer)
Remove a customizer for menus and toolbars.- Parameters:
customizer
- The customizer to remove.- Since:
- 18
-
createEditorComponentProvider
EditorComponentProvider createEditorComponentProvider(java.lang.String[] allowedPages, java.lang.String initialPage) throws AuthorComponentException
Creates a new editor component. Such a component is a small XML editing container which can have all editing modes and can be added to a custom Swing-based dialog created by the developer in order for example to preview content from various target files.- Parameters:
allowedPages
- The pages which will be used in the editor. One of the constant fields:EditorPageConstants.PAGE_TEXT
,EditorPageConstants.PAGE_AUTHOR
,EditorPageConstants.PAGE_GRID
initialPage
- The initial page in which the component will edit.- Returns:
- the new editor component.
- Throws:
AuthorComponentException
- The component was not initialized properly.- Since:
- 18.1
-
createEditorComponentProvider
EditorComponentProvider createEditorComponentProvider(java.lang.String[] allowedPages, java.lang.String initialPage, java.lang.String contentType) throws AuthorComponentException
Creates a new editor component. Such a component is a small editing container which can have all editing modes and can be added to a custom Swing-based dialog created by the developer in order for example to preview content from various target files.- Parameters:
allowedPages
- The pages which will be used in the editor. One of the constant fields:EditorPageConstants.PAGE_TEXT
,EditorPageConstants.PAGE_AUTHOR
,EditorPageConstants.PAGE_GRID
initialPage
- The initial page in which the component will edit.contentType
- The proposed content type for the component,null
to fall back to XML content type.- Returns:
- the new editor component.
- Throws:
AuthorComponentException
- The component was not initialized properly.- 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.
-
getResourceBundle
PluginResourceBundle getResourceBundle()
A message bundle that holds all the internationalized messages displayed in all the plugins for a language set in Preferences. It works as a map in which any message is accessed by a specific key. The translation file must be located in a directory named "i18n" (placed in the plugin's root directory). The translation file name must be: translation*.xml Here is a small sample of an translation XML file structure:<translation> <languageList> <language description="English US" lang="en_US"/> <language description="German" lang="de_DE"/> <language description="French" lang="fr_FR"/> </languageList> <key value="key_name1"> <comment>key description1</comment> <val lang="en_US">en_US_translation1</val> <val lang="de_DE">de_DE_translation1</val> <val lang="fr_FR">fr_FR_translation1</val> </key> <key value="key_name2"> <comment>key description2</comment> <val lang="en_US">en_US_translation2</val> <val lang="de_DE">de_DE_translation2</val> <val lang="fr_FR">fr_FR_translation2</val> </key> ........................ </translation>
- Returns:
- The message bundle used to get the translation of messages used in the plugin.
- Since:
- 18.1
-
getProxyDetailsProvider
ProxyDetailsProvider getProxyDetailsProvider()
Get access to currently configured network proxy information.- Returns:
- access to currently configured network proxy information.
- Since:
- 19.1
-
getProjectManager
ProjectController getProjectManager()
Get access to Project related API.- Returns:
- The project manager API
- Since:
- 19.1
-
addPluginExtension
void addPluginExtension(java.lang.String extensionType, PluginExtension pluginExtension)
Adds a plug-in extension of a specified type.- Parameters:
extensionType
- The type of the plugin extension; can be a constant from .pluginExtension
- The plugin extension implementation to be added.- Since:
- 24.0
-
-