The cshelp plug-in generates contexts files in the format that Eclipse-based applications use for Context-Sensitive Help. The standard DITA-OT transforms can be used to produce XHTML® output. This chapter focuses on producing Eclipse contexts files.
If you develop code plug-ins that extend the Eclipse user interface or develop documentation for development teams that do, you either already are or should be incorporating Context-Sensitive Help into the user interface.
The Eclipse user interface allows you to display Context-Sensitive Help as an infopop or in the Dynamic Help view. The latter option includes information and functionality in addition to the contents of the Context-Sensitive Help topic.
For more information on contexts files and developing Context-Sensitive Help for Eclipse, refer to the documentation for the current Eclipse release, available on http://www.eclipse.org.
The cshelp plug-in was developed by a team of writers representing the various software brands in IBM®, led by the author. It is currently in use by products in several brands that develop applications for the Eclipse environment.
The cshelp plug-in is available from the DITA-OT site on sourceforge.net:
http://sourceforge.net/project/showfiles.php?group_id=132728
Download and unzip the plug-in into your DITA-OT installation (typically, the <DITA-OT>/demo directory).
To complete the installation, open a command prompt and run the Ant integrator build file from your DITA-OT directory (ant -f integrator.xml).
<?xml version="1.0" encoding="UTF-8"?> <?NLS TYPE="org.eclipse.help.contexts"?> <contexts> <context id="new_wizard_selection_wizard_page_context"> <description> Choose the type of resource you would like to create. </description> <topic label="Resources" href="concepts/concepts-12.htm"/> </context> … </contexts>
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE cshelp PUBLIC "-//OASIS//DTD DITA CSHelp//EN" "..\demo\cshelp\dtd\cshelp.dtd"> <cshelp id="csh_outer_container" xml:lang="en-us"> <title>sample1_context</title> <shortdesc></shortdesc> <csbody></csbody> <cshelp id="new_wizard_selection_wizard_page_context"> <title></title> <shortdesc>Choose the type of resource you would like to create.</shortdesc> <csbody> </csbody> <related-links> <link format="htm" href="concepts/concepts-12.htm" scope="peer"> <linktext>Resources</linktext> </link> </related-links> </cshelp> ... </cshelp>
Use as many DITA files per Eclipse plug-in that you want, and create a simple DITA map file inside the plug-in that points to each of them. Include any copyright information in the DITA map; this information will appear in comment tags in each generated contexts file. Note, however, that relationship tables (reltables) cannot be used to create related links when producing Eclipse contexts files.
Refer to the Eclipse documentation for instructions on incorporating context IDs in code plug-ins. This information is typically in Platform Plug-in Developer Guide > Programmer's Guide > User assistance support > Help > Context-Sensitive Help > Declaring a context ID.
<property name="args.xsl" value="${dita.dir}${file.separator}demo${file.separator} cshelp${file.separator}xsl${file.separator}dit2context.xsl"/>
<property name="args.outext" value="xml"/>
Context-Sensitive Help is an integral part of the user assistance for software applications. If you already use DITA to source your Eclipse documentation plug-ins, sourcing the Context-Sensitive Help in DITA allows you to maintain a consistent authoring and build environment and consistently formatted output.
Jeff Antley
IBM Corporation
OASIS DITA Help Subcommittee