Class HelpSystem


  • public final class HelpSystem
    extends Object
    This class provides general access to help content contributed to the "org.eclipse.help.toc" and "org.eclipse.help.contexts" extension points.

    This class provides static methods only; it is not intended to be instantiated or subclassed.

    Since:
    3.0
    • Method Detail

      • getContext

        public static IContext getContext​(String contextId)
        Computes and returns context information for the given context id for the platform's current locale.
        Parameters:
        contextId - the context id, e.g. "org.my.plugin.my_id"
        Returns:
        the context, or null if none
      • getContext

        public static IContext getContext​(String contextId,
                                          String locale)
        Computes and returns context information for the given context id and locale.
        Parameters:
        contextId - the context id, e.g. "org.my.plugin.my_id"
        locale - the locale being requested, e.g. "en_US"
        Returns:
        the context, or null if none
      • getTocs

        public static IToc[] getTocs()
        Returns the list of all integrated tables of contents available. Each entry corresponds of a different help "book".
        Returns:
        an array of TOC's
      • getIndex

        public static IIndex getIndex()
        Returns the keyword index available in the help system.
        Returns:
        the keyword index
        Since:
        3.2
      • getHelpContent

        public static InputStream getHelpContent​(String href)
        Returns an open input stream on the contents of the specified help resource in the platform's current locale. The client is responsible for closing the stream when finished.
        Parameters:
        href - the URL (as a string) of the help resource

        Valid href are as described in IHelpResource.getHref

        Returns:
        an input stream containing the contents of the help resource, or null if the help resource could not be found and opened
      • getHelpContent

        public static InputStream getHelpContent​(String href,
                                                 String locale)
        Returns an open input stream on the contents of the specified help resource for the speficied locale. The client is responsible for closing the stream when finished.
        Parameters:
        href - the URL (as a string) of the help resource

        Valid href are as described in IHelpResource.getHref

        locale - the locale code, e.g. en_US
        Returns:
        an input stream containing the contents of the help resource, or null if the help resource could not be found and opened
        Since:
        3.0
      • isShared

        public static boolean isShared()
        Returns whether or not the help system, in its current mode of operation, can be shared by multiple (potentially remote) users. This is a hint to the help system implementation that it should not perform operations that are specific to the help system's local environment.

        For example, when true, the default dynamic content producer implementation will not perform any filtering based on local system properties such as operating system or activities.

        If you are providing your own help implementation that is shared, you must notify the platform on startup by calling setShared(true).

        Returns:
        whether or not the help system can be shared by multiple users
        Since:
        3.2
      • setShared

        public static void setShared​(boolean shared)
        Sets whether or not the help system, in its current mode of operation, can be shared by multiple (potentially remote) users. This is a hint to the help system implementation that it should not perform operations that are specific to the help system's local environment.

        By default the help system is flagged as not shared. If you are providing your own help implementation that is shared, you must call this on startup with the parameter true.

        Parameters:
        shared - whether or not the help system can be shared by multiple users