The Eclipse RCP Platform provides the following:
The litrature sugests the creation of separate documentation plug-ins. That is a plug-in that only consists of XML configuration files and HTML content for the help system. In practice many plug-ins are package with there help files.
The above filenames are only a suggestion - plugin.xml is used to extend three kinds of extention points:
Online Help FilesThe first configuration file used by Online help is one that is familiar to you - plugin.xml. plugin.xml extention points: <extension point="org.eclipse.help.toc"> <toc file="toc.xml" primary="true"/> <toc file="tocconcepts.xml"/> </extension> The next xml file is the above mentioned toc.xml file: <toc label="XYZ User's Guide" topic="html/overview.html"> <topic label="Concepts"> <anchor id="concepts"/> </topic> </toc> And the tocconcepts.xml file follows a similar format: <toc label="Concepts" link_to="toc.xml#concepts"> <topic label="Main Topic" href="html/concepts/maintopic.html"> <topic label="Sub Topic" href="html/concepts/subtopic.html" /> </topic> <topic label="Main Topic 2"> <topic label="Sub Topic 2" href="html/concepts/subtopic2.html" /> </topic> </toc> The configuration files refer to the following directory structure: toc.xml tocconcepts.xml html/overview.html html/concepts/maintopic.html html/concepts/subtopic.html html/concepts/subtopic2.html Help CategoryUnable to render {include} Couldn't find a page to include called: Help Category
Context Sensitive HelpContext sensitive help (or InfoPops) is available when the user presses the F1 key. Context sensitive help can be associated with:
plugin.xml file extention point: <extension point="org.eclipse.help.contexts"> <contexts file="contexts.xml" plugin="an.example.plugin"/> </extension> Sample context.xml file: <contexts> <context id="add_action_context"> <description>This command adds.</description> <topic label="Add" href="tasks/tasks-1.htm"/> <topic label="Concepts" href="html/concepts/maintopic.html"/> </context> </contexts> To contect everything up on the UI side of things we need to know the help contexts ids. public interface IHelpContextIds { public static final String PREFIX = XYZPlugin.ID + "."; //$NON-NLS-1$ // Dialogs public static final String CONNECTION = PREFIX + "connection_context"; //$NON-NLS-1$ // View public static final String SEARCH_VIEW = PREFIX + "search_view_context"; // Viewers public static final String SEARCH_VIEWER = PREFIX + "search_viewer_context"; //$NON-NLS-1$ // Actions public static final String SEARCH_ACTION = PREFIX + "search_action_context"; //$NON-NLS-1$ } And finally the connection needs to be made to the control: WorkbenchHelp.setHelp( newAction , HelpContextIds.NEW_REGISTRY_LOCATION_ACTION); TODO: Dynamic HelpFigure out the contentProducer extention point in the hopes of generating context-sensitive help for DataStore parameter screens. Sample Table of Contents WizardEclipse provides a code generation template assocaiated with the toc extention point.
This is enough to get us going. |
(c) Copyright (c) 2004,2005 Refractions Research Inc. and others. |