How to add help to a plugin

From Bioclipse
Jump to: navigation, search
Development tutorial
Responsible author:Ola
Bioclipse version:N/A
"N/A" is not a number.
Last updated:2009-10-10
Tags:


Outline

  • Add help in the plugin.xml
  • Add docs in html

See net.bioclipse.ui for reference


TBC


Help contexts

Examples: The following is an example of using the contexts extension point:

(in file plugin.xml)

<extension point="org.eclipse.help.contexts">
  <contexts file="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> 

Associating contexts with GUI elements

The setHelp method in org.eclipse.ui.help.IWorkbenchHelpSystem is used to associate a context id with a Control, IAction, Menu, or MenuItem. The context id should be fully qualified with the plug-in id. For example, the following snippet associates the id "com.example.helpexample.panic_button" with a button in the application.

PlatformUI.getWorkbench().getHelpSystem().setHelp(myButton, com.example.helpexample.panic_button);

Contributing help to a topic from a different plugin

Links