<!ELEMENT extension (contexts*)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
<!ELEMENT contexts EMPTY>
<!ATTLIST contexts
file CDATA #REQUIRED
plugin CDATA #IMPLIED>
上下文清单文件的内容的配置标记:
<!ELEMENT contexts (context)* ) >
<!ELEMENT context (description?,topic*) >
<!ATTLIST context id ID #REQUIRED >
<!ELEMENT description (#PCDATA)>
<!ELEMENT topic EMPTY >
<!ATTLIST topic label CDATA #REQUIRED >
<!ATTLIST topic href CDATA #IMPLIED
>
上下文清单文件提供当用户请求上下文相关帮助时所需的所有信息。此标识由平台传递至帮助系统以标识当前活动的上下文。然后将检索具有匹配标识的上下文定义。当清单文件中的标识在内存中时,它们由 pluginID.contextID 字符串唯一地进行标识,所以它们不得包含句点字符。然后帮助系统创建 IContext 对象,该对象包含插件中给定标识的所有上下文定义的描述和主题。将对用户显示描述,而相关主题可帮助用户了解当前上下文。相关主题是一些 html 文件,它们与作为联机帮助的一部分的主题一起打包在 doc.zip 中。
如果插件定义某一上下文标识,则可以扩展上下文的描述或相关链接(通过使用同一标识声明另一上下文来进行)。
<extension point=
"org.eclipse.help.contexts"
>
<contexts file=
"xyzContexts.xml"
/>
</extension>
(在文件 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>
可通过创建具有已翻译版本的文档的 doc.zip 文件并将
doc.zip 文件放置在
nl/<language>/<country> 或 nl/<language> 目录中来使
doc.zip 中包含的相关主题本地化。在缺省查找插件目录之前,帮助系统将查找这些目录下面的文件。
Copyright (c) 2000, 2005 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made
available under the terms of the Eclipse Public License v1.0 which accompanies
this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html