Note: The help system is still under development and can be expected to change somewhat before reaching stability. It is being made available at this stage to solicit feedback from early adopters, on the understanding that the details of the contribution mechanisms might change in breaking ways.

Contexts

Identifier: org.eclipse.help.contexts

Description: For defining context-sensitive help for an individual plug-in.

Configuration Markup:

   <!ELEMENT contexts EMPTY>
   <!ATTLIST contexts name CDATA #REQUIRED>

Configuration Markup for Contexts (this is what goes into the contexts manifest file):

    <!ELEMENT contexts (context)* ) >

    <!ELEMENT context (description?,topic*) >
    <!ATTLIST context id  ID #REQUIRED >

    <!ELEMENT description (#PCDATA)>

    <!ELEMENT topic (topic)* >
    <!ATTLIST topic id ID #IMPLIED >
    <!ATTLIST topic label CDATA #REQUIRED >
    <!ATTLIST topic href  CDATA #IMPLIED >

The contexts manifest files provide all the information needed when context-sensitive help is requested by the user. The id is passed by the platform to identify the currently active context. The context definition with a matching id is then retrieved. This context element contains the brief description that is to be displayed to the user, as well as related topics that the user might find useful for understanding the current context.
 

Examples:

The following is an example of using the contexts extension point.

(in file plugin.xml)

   <extension point="org.eclipse.help.contexts">
      <contexts name="xyzContexts.xml"/>
   </extension>
 

(in file xyzContexts.xml)

    <contexts>
      <context  id="generalContextId">
        <description> This is a sample F1 help string.</description>
        <topic href="contexts/RelatedContext1.html"  label="Help Related Topic 1"/>
        <topic href="contexts/RelatedContext2.html"  label="Help Related Topic 2"/>
      </context>
    </contexts>
 

Externalizing Strings

Context manifest files externalize their strings by replacing the string with a key (e.g. %fooWidget) and creating an entry in the context.properties file of the form:
    fooWidget = "Builds the project "
The related topic labels are externalized using a similar approach. To externalize <topic href="fooHelp.html" label="Building Projects">, replace its label with a key %buildingProjects . The topic will look like:
    <topic href="fooHelp.html" label="%buildingProjects">
Create an entry in the context.properties file containing the entry:
    buildingProjects = Building Projects
The help system will use context.properties when looking up strings externalized by our context help contributions.
 

API Information: No code is required to use this extension point. All that is needed is to supply the appropriate manifest file(s) mentioned in the plugin.xml file.
 

Supplied Implementation: The optional default implementation of the help system UI supplied with the Eclipse platform fully supports the contexts extension point.
 
 
 

Copyright IBM Corp. 2000, 2001.  All Rights Reserved.