Interface IWorkbenchHelpSystem


  • public interface IWorkbenchHelpSystem

    The interface that is used to access the workbench help system. Replaces static methods on WorkbenchHelp.

    This interface is not intended to be implemented by clients.

    Since:
    3.1
    Restriction:
    This interface is not intended to be implemented by clients.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void displayContext​(IContext context, int x, int y)
      Displays context-sensitive help for the given context.
      void displayDynamicHelp()
      Displays the dynamic help for the current UI context.
      void displayHelp()
      Displays the entire help bookshelf.
      void displayHelp​(String helpContextId)
      Calls the help support system to display the given help id.
      void displayHelp​(IContext context)
      Displays context-sensitive help for the given context.
      void displayHelpResource​(String href)
      Displays help content for the help resource with the given URL.
      void displaySearch()
      Displays the help search system.
      boolean hasHelpUI()
      Returns whether there is a UI help system installed.
      boolean isContextHelpDisplayed()
      Returns whether the context-sensitive help window is currently being displayed.
      URL resolve​(String href, boolean documentOnly)
      Resolves the help resource href by converting it into a legitimate URL according to the implementation of the help system.
      void search​(String expression)
      Starts the search using the help search system.
      void setHelp​(IAction action, String helpContextId)
      Sets the given help id on the given action.
      void setHelp​(Control control, String helpContextId)
      Sets the given help id on the given control.
      void setHelp​(MenuItem item, String helpContextId)
      Sets the given help id on the given menu item.
      void setHelp​(Menu menu, String helpContextId)
      Sets the given help id on the given menu.
    • Method Detail

      • hasHelpUI

        boolean hasHelpUI()
        Returns whether there is a UI help system installed.
        Returns:
        whether there is a UI help system installed
      • displayHelp

        void displayHelp()
        Displays the entire help bookshelf.

        Ignored if no help UI is available.

      • displaySearch

        void displaySearch()
        Displays the help search system.

        Ignored if no help UI is available.

      • displayDynamicHelp

        void displayDynamicHelp()
        Displays the dynamic help for the current UI context.

        Ignored if no help UI is available.

      • search

        void search​(String expression)
        Starts the search using the help search system.

        Ignored if no help UI is available.

        Parameters:
        expression - the search expression. The actual syntax rules of the expression are dependent on the active help system. Refer to the help system documentation for more details.
      • displayContext

        void displayContext​(IContext context,
                            int x,
                            int y)
        Displays context-sensitive help for the given context.

        (x,y) coordinates specify the location where the context sensitive help UI will be presented. These coordinates are screen-relative (ie: (0,0) is the top left-most screen corner). The platform is responsible for calling this method and supplying the appropriate location.

        Ignored if no help UI is available.

        Parameters:
        context - the context to display
        x - horizontal position
        y - vertical position
      • displayHelpResource

        void displayHelpResource​(String href)
        Displays help content for the help resource with the given URL.

        This method is called by the platform to launch the help system UI, displaying the documentation identified by the href parameter.

        The help system makes no guarantee that all the help resources can be displayed or how they are displayed.

        Ignored if no help UI is available.

        Parameters:
        href - the URL of the help resource.

        Valid href are as described in IHelpResource.getHref()

      • displayHelp

        void displayHelp​(String helpContextId)
        Calls the help support system to display the given help id.

        May only be called from a UI thread.

        Parameters:
        helpContextId - the id of the context to display
      • displayHelp

        void displayHelp​(IContext context)
        Displays context-sensitive help for the given context.

        May only be called from a UI thread.

        Parameters:
        context - the context to display
      • isContextHelpDisplayed

        boolean isContextHelpDisplayed()
        Returns whether the context-sensitive help window is currently being displayed. Returns false if the help UI has not been activated yet.
        Returns:
        true if the context-sensitive help window is currently being displayed, false otherwise
      • setHelp

        void setHelp​(IAction action,
                     String helpContextId)
        Sets the given help id on the given action.
        Parameters:
        action - the action on which to register the id
        helpContextId - the id to use when F1 help is invoked
      • setHelp

        void setHelp​(Control control,
                     String helpContextId)
        Sets the given help id on the given control.
        Parameters:
        control - the control on which to register the id
        helpContextId - the id to use when F1 help is invoked
      • setHelp

        void setHelp​(Menu menu,
                     String helpContextId)
        Sets the given help id on the given menu.
        Parameters:
        menu - the menu on which to register the id
        helpContextId - the id to use when F1 help is invoked
      • setHelp

        void setHelp​(MenuItem item,
                     String helpContextId)
        Sets the given help id on the given menu item.
        Parameters:
        item - the menu item on which to register the id
        helpContextId - the id to use when F1 help is invoked
      • resolve

        URL resolve​(String href,
                    boolean documentOnly)
        Resolves the help resource href by converting it into a legitimate URL according to the implementation of the help system. Help resources that already have a protocol will be unchanged.
        Parameters:
        href - the URL of the help resource.

        Valid href are as described in IHelpResource.getHref()

        documentOnly - if true, the resulting URL must point at the document referenced by href. Otherwise, it can be a URL that contains additional elements like navigation that the help system adds to the document.
        Returns:
        the resolved URL or null if no help UI is available.