Interface StandalonePluginWorkspace

    • 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 be null 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
      • 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