<!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"> | |
| |
<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> <!ELEMENT contexts EMPTY></tt> | |
<br><tt> <!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> <!ELEMENT contexts (context)* ) ></tt> | |
<p><tt> <!ELEMENT context (description?,topic*) ></tt> | |
<br><tt> <!ATTLIST context id ID #REQUIRED ></tt> | |
<p><tt> <!ELEMENT description (#PCDATA)></tt> | |
<p><tt> <!ELEMENT topic EMPTY ></tt> | |
<br><tt> <!ATTLIST topic label CDATA #REQUIRED ></tt> | |
<br><tt> <!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. The description is to be displayed to the user, and | |
related topics might be useful to the user for understanding the current | |
context. The related topic are html files packaged in doc.zip, together | |
with topics that are part of on line help. | |
<br> | |
<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> <extension point="org.eclipse.help.contexts"></tt> | |
<br><tt> <contexts file="xyzContexts.xml"/></tt> | |
<br><tt> </extension></tt> | |
<br> | |
<p>(in file <tt>xyzContexts.xml</tt>) | |
<p><tt> <contexts></tt> | |
<br><tt> <context id="generalContextId"></tt> | |
<br><tt> <description> This | |
is a sample F1 help string.</description></tt> | |
<br><tt> <topic href="contexts/RelatedContext1.html" | |
label="Help Related Topic 1"/></tt> | |
<br><tt> <topic href="contexts/RelatedContext2.html" | |
label="Help Related Topic 2"/></tt> | |
<br><tt> </context></tt> | |
<br><tt> </contexts></tt> | |
<br> | |
<h4> | |
Externalizing Strings</h4> | |
The Context XML files can be translated and the resulting copy (with translated | |
descriptions labels) should be placed in nl/<language>/<country> | |
or nl/<language> directory. The <language> and <country> | |
stand for two letter language and country codes as used in locale codes. | |
For example, Traditional Chinese translations should be placed in the nl/zh/TW | |
directory. The nl/<language>/<country> directory has a higher | |
priority than nl/<language>. Only if no file is found in the nl/<language>/<country>, | |
the file residing in nl/<language> will be used. 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/<language>/<country> or nl/<language> directory. The help | |
system will look for the files under this directories before defaulting | |
to plugin directory. | |
<p> | |
<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> | |
<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> |