openejb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel S. Haischt" <>
Subject [INFO] How to add context help to the Eclipse plugin
Date Tue, 25 Mar 2008 17:19:23 GMT
Hi all,

I've added basic help support to the Eclipse plugin for
OpenEJB. Basically the context help and the standalone help
is contained within the following plugins:

* is the default and should contain
English only. for example contains
German beside of other language dependent files. You should
note that anything beside of is a
fragment and not a plugin!

How are fragments structured? Example:

* Basically any localized properties file can be stored in
   the root folder.
* Language dependent files like HTML files or images etc.
   should go into the folder nl/<lang_code>, where lang_code
   could be for example 'de'.

I prepared this kind of directory structure already. Tho,
of course the actual documentation and translation work
still needs to be done if we want a functional help plugin.

Basically the main entry points to the help system are...

* TOCs (table of contents -> toc*.xml)
* Indexes (index.xml)
* Context help (context.xml)

These files are stored in the root of the help plugin.

Context help (context.xml):

Contains IDs and references to an actual HTML file.


   <context id="test_id" title="Test">
     <topic href="html/gettingstarted/maintopic.html" label="FooBar"/>

The ID is test_id and must be reflected by the Java code.

How to associate a help ID with an SWT element?

AFAIK help IDs can only be associated with Controls, IActions, Menus
and MenuItems if using the setHelp() method. Please have a look at
the following page for further reference:

In our case I did use the displayHelp() method which simply requires
you to specify the help context ID. This ID is composed of the plugin
name plus the actual context ID (here: test_id).

code example (ProjectSelectionPage):

public void performHelp() {

So as you can see the actual work that needs to be done regarding
the help system is ...

a) write the help contents (HTML or XML that may be transformed to HTML)
b) define context help IDs (in theory each widget may get an ID if using
c) associate wizard pages and widgets with the actual context help IDs
    right within the code.

If this has been accomplish you would get approprate context help if
pressing F1 or clicking on the blue question mark icon.

Daniel S. Haischt

View raw message