Interface PluginWorkspace

    • 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 location
        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 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, never null.
        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. Right now the listener is only called 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
      • 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 an AuthorDocumentController.
        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 the AuthorDocumentController API.
        Parameters:
        systemId - The system id of the resource. If null, the reader must be provided and relative DTD entity references will not be properly resolved.
        documentReader - The document reader. If null, 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 an AuthorDocumentController.
        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 the AuthorDocumentController API.
        Parameters:
        systemId - The system id of the resource. If null, the reader must be provided and relative DTD entity references will not be properly resolved.
        documentReader - The document reader. If null, 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