blob: 6246d058bd851b0c5f719f1c77be0b8cc5bfb8f3 [file] [log] [blame]
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.79 [en] (Windows NT 5.0; U) [Netscape]">
<title>Help System extension points: Contexts</title>
</head>
<body link="#0000FF" vlink="#800080">
&nbsp;
<table BORDER COLS=1 WIDTH="100%" >
<tr>
<td><b>Note: The help system is still under development and can be expected
to change somewhat before reaching stability. It is being made available
at this stage to solicit feedback from early adopters, on the understanding
that the details of the contribution mechanisms might change in breaking
ways.</b></td>
</tr>
</table>
<center>
<h1>
Contexts</h1></center>
<b><i>Identifier: </i></b>org.eclipse.help.contexts
<p><b><i>Description:</i></b> For defining context-sensitive help for an
individual plug-in.
<p><b><i>Configuration Markup:</i></b>
<p><tt>&nbsp;&nbsp; &lt;!ELEMENT contexts EMPTY></tt>
<br><tt>&nbsp;&nbsp; &lt;!ATTLIST contexts file CDATA #REQUIRED></tt>
<ul>
<li>
<b>file</b> - the name of the manifest file which contains the context-sensitive
help documentation for this plug-in.</li>
</ul>
<i><b>Configuration Markup for Contexts </b>(this is what goes into the
contexts manifest file)<b>:</b></i>
<p><tt>&nbsp;&nbsp;&nbsp; &lt;!ELEMENT contexts (context)* ) ></tt>
<p><tt>&nbsp;&nbsp;&nbsp; &lt;!ELEMENT context (description?,topic*) ></tt>
<br><tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST context id ID #REQUIRED ></tt>
<p><tt>&nbsp;&nbsp;&nbsp; &lt;!ELEMENT description (#PCDATA)></tt>
<p><tt>&nbsp;&nbsp;&nbsp; &lt;!ELEMENT topic EMPTY ></tt>
<br><tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST topic label CDATA #REQUIRED ></tt>
<br><tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST topic href CDATA #IMPLIED ></tt>
<p>The contexts manifest files provide all the information needed when
context-sensitive help is requested by the user. The id is passed by the
platform to identify the currently active context. The context definitions
with matching IDs are then retrieved. The IContext object is then created
by help system that contains descriptions and topics from all context definitions
for a given ID.&nbsp; The description is to be displayed to the user, and
related topics might be useful to the user for understanding the current
context.&nbsp; The related topic are html files packaged in doc.zip, together
with topics that are part of on line help.
<br>&nbsp;
<p><b><i>Examples:</i></b>
<p>The following is an example of using the <tt>contexts</tt> extension
point.
<p>(in file <tt>plugin.xml</tt>)
<p><tt>&nbsp;&nbsp; &lt;extension point="org.eclipse.help.contexts"></tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;contexts file="xyzContexts.xml"/></tt>
<br><tt>&nbsp;&nbsp; &lt;/extension></tt>
<br>&nbsp;
<p>(in file <tt>xyzContexts.xml</tt>)
<p><tt>&nbsp;&nbsp;&nbsp; &lt;contexts></tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;context&nbsp; id="generalContextId"></tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;description> This
is a sample F1 help string.&lt;/description></tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;topic href="contexts/RelatedContext1.html"&nbsp;
label="Help Related Topic 1"/></tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;topic href="contexts/RelatedContext2.html"&nbsp;
label="Help Related Topic 2"/></tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/context></tt>
<br><tt>&nbsp;&nbsp;&nbsp; &lt;/contexts></tt>
<br>&nbsp;
<h4>
Externalizing Strings</h4>
The Context XML files can be translated and the resulting copy (with translated
descriptions labels) should be placed in nl/&lt;language>/&lt;country>
or nl/&lt;language> directory.&nbsp; The &lt;language> and &lt;country>
stand for two letter language and country codes as used in locale codes.&nbsp;
For example, Traditional Chinese translations should be placed in the nl/zh/TW
directory.&nbsp; The nl/&lt;language>/&lt;country> directory has a higher
priority than nl/&lt;language>.&nbsp; Only if no file is found in the nl/&lt;language>/&lt;country>,
the file residing in nl/&lt;language> will be used.&nbsp; The the root
directory of a plugin will be searched last.
<p>The related topics contained in doc.zip can be localized by creating
a doc.zip file with translated version of documents, and placing doc.zip
in
<br>nl/&lt;language>/&lt;country> or nl/&lt;language> directory. The help
system will look for the files under this directories before defaulting
to plugin directory.
<p>&nbsp;
<br><b><i>API Information</i>: </b>No code is required to use this extension
point. All that is needed is to supply the appropriate manifest file(s)
mentioned in the <tt>plugin.xml</tt> file.
<br>&nbsp;
<p><b><i>Supplied Implementation: </i></b>The default implementation of
the help system UI supplied with the Eclipse platform fully supports the
<tt>contexts</tt> extension point.
<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001. All Rights Reserved." BORDER=0 height=12 width=195></a>
</body>
</html>