An infopop is a small window associated with a particular
widget. It displays context-sensitive help and links to related help
topics for the widget. An infopop displays when the user puts focus
on the widget and presses the F1 key. This section explains how to
add an infopop.
Procedure
- Define the infopop using the org.eclipse.help.contexts extension
point. For example, here is an example plug-in manifest file for an
extensions plug-in:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
<extension
point="com.ibm.commerce.telesales.configurator">
<configurator path="config"/>
</extension>
<extension point="org.eclipse.help.contexts">
<contexts file="ExtendedHelpContexts.xml"/>
</extension>
</plugin>
- Create an XML file corresponding to the org.eclipse.help.contexts extension
point definition from Step 1. This is the comments of ExtendedHelpContexts.xml:
<?xml version="1.0" encoding="UTF-8"?>
<?NLS type="org.eclipse.help.contexts"?>
<contexts>
<context id="dialog_logon">
<description>
Extended description for the logon dialog.
</description>
<topic label="Logon"
href="../com.ibm.commerce.telesales.doc/refs/logon.htm"/>
<topic label="Communication preferences"
href="../com.ibm.commerce.telesales.doc/refs/communication_prefs.htm"/>
</context>
</contexts>
In the preceding example, the <description> element
text will display. Underneath the description, the links defined
in the <topic> elements will display
as hypertext links..
- Register your user interface element to use your infopop
by using the setHelp method on the class
org.eclipse.ui.help.Workbench (refer
to the class API documentation for more information about using setHelp).