Installing the stand-alone help system

If you are creating an application that is not based on the Eclipse framework, you can still use the Eclipse help system. Your application can package and install the stand-alone help system, a very small version of Eclipse that has had everything except the help system stripped out of it. Then, your application can make API calls from its Help menu, or from UI objects, to launch the help browser. The stand-alone help system has all the features of the integrated help system, except infopops and active help.

Installation/packaging

These steps are for the help system integrator and are not meant to address all the possible scenarios. It is assumed that the launching application is in Java, and that all your documentation is delivered as Eclipse plug-ins and, in general, you are familiar with the eclipse help system.
  1. Download the Eclipse 2.0 Release level Platform Runtime Binary driver from www.eclipse.org.
  2. Install (unzip) the driver under your application directory, for example, d:\myApp. This will create an eclipse subdirectory, d:\myApp\eclipse that contains the code required for the Eclipse platform (which includes the help system).

How to call the help classes

  1. Make sure d:\myApp\eclipse\plugins\org.eclipse.help_2.0.0\help.jar is on your app classpath. The class you use to start, launch, and shut down the help system is org.eclipse.help.standalone.Help.
  2. In your application, create an instance of the Help class by passing the plugins directory. This object should be held onto until the end of your application.
    Help helpSystem = new Help("d:\\myApp\\eclipse\\plugins"); 
  3. To start the help system:
    helpSystem.start(); 

    At the end of your application, to shutdown the help system:

    helpSystem.shutdown(); 
  4. To invoke help when needed:
    helpSystem.displayHelp(); 

    You can also call help on specific primary TOC files or topics:

    helpSystem.displayHelp("/com.mycompany.mytool.doc/toc.xml");
    helpSystem.displayHelp("/com.mycompany.mytool.doc/tasks/task1.htm");
  5. To launch context sensitive help, call helpSystem.displayContext(contextId, x, y) where contextId is a fully qualified context id. The screen coordinates, x and y, are not currently used.

Testing stand-alone help

The org.eclipse.help.standalone.Help class has a simple main program that you can launch and see how the stand-alone help works out of the box. From a command line, run the following command:

java -classpath d:\myApp\eclipse\plugins\org.eclipse.help_2.0.0\help.jar 
org.eclipse.help.standalone.Help d:\myApp\eclipse\plugins
Copyright IBM Corp. and others 2000, 2002.