Integrating with Eclipse help system

Before you begin

To integrate with the Eclipse help system, you should create a new plugin for the help content first. For more details about how to create a new plugin, see http://www.eclipse.org/articles/article.php?file=Article-AddingHelpToRCP/index.html.

About this task

Perform the following steps to integrate with the Eclipse help system.

Procedure

  1. Create a new plugin for your help documentation system.
    1. Open the META-IMF MANIFEST.MF file.
    2. Click the extension points tab, and create a new ID. In the following example in this section, this ID is named DeveloperHelpContent.
  2. Create an xml file for the help context definition directly under the current project. In the following example in this section, the name with the filename extension is myHelpContexts.xml.
  3. Add dependencies and extensions to the RCP project.
    1. Navigate the Dependencies tab, and add org.eclipse.help and org.eclipse.help.ui plug-ins.
    2. Navigate the Extensions tab, and add the org.eclipse.help.contexts extension point.
    3. Right click the org.eclipse.help.contexts extension point, and select New > Contexts
    4. Fill in the file* field with the name of the newly created xml file.
    5. Fill in the plugin field with the newly created plugin ID.
  4. Run the RCP workbench. The help context message is displayed if you press the help shortcut key.

Example

The following is the sample code in the help context definition file, myHelpContexts.xml.
<contexts>
         <context id="messageBUTTON">
                  <description>I am a button. </description>
         </context>
</contexts>
The following is the sample code in the UI definition file to specify the helpID value of the widget.
<Button bounds="120, 300, 30, 30" text="label" helpId="messageBUTTON"/>
The following is the sample code in the engine global setting file to sepecify the helpPlugin and helpKeyStroke values.
<map id="globalSettings">
       <entry key="helpKeyStroke" value="F10"/>
       <entry key="helpPlugin" value="yourHelpPlurginId"/>
</map>