環境定義

識別碼:org.eclipse.help.contexts

說明:用來定義個別外掛程式的上下文相關說明。

配置標記:

   <!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
   >

範例:以下是使用環境定義延伸點的範例:
(在 plugin.xml 檔中)

   <extension point="org.eclipse.help.contexts"> 
      <contexts file="xyzContexts.xml"/> 
   </extension> 

(在 xyzContexts.xml 檔中)

    <contexts>
      <context  id="generalContextId">
        <description>這是範例 F1 說明字串。</description>
        <topic href="contexts/RelatedContext1.html"  label="Help Related Topic 1"/>
        <topic href="contexts/RelatedContext2.html"  label="Help Related Topic 2"/>
      </context>
    </contexts>
 

外部化字串 「環境定義 XML」檔可加以轉換,而且產生的副本(具有轉換的說明標籤)應該置於 nl/<language>/<country> 或 nl/<language> 目錄中。  <language> 和 <country> 代表在語言環境碼中使用、有兩個字母的語言碼和國碼。  例如,繁體中文轉換應該置於 nl/zh/TW 目錄中。   nl/<language>/<country> 目錄比起 nl/<language> 具有更高的優先順序。  僅在 nl/<language>/<country> 找不到檔案時,才會使用 nl/<language> 中常駐的檔案。   外掛程式的根目錄將放在最後搜尋。

相關主題可藉由下列方式進行本土化 - 建立將翻譯後文件併入的 doc.zip,把這個 doc.zip 檔放置在
nl/<language>/<country> 或 nl/<language> 目錄下。在預設為 plugin 目錄前,說明系統將在這個目錄下尋找檔案。

API 資訊:使用這個延伸點不需要任何程式碼。只需要提供 plugin.xml 檔中所提及的適當 manifest 檔 就行了。

提供的實作:Eclipse 平台所提供的說明系統 UI 之預設實作能充分支援 contexts 延伸點。

Copyright (c) 2000, 2003 IBM Corporation and others.
All rights reserved. 這個程式和伴隨的素材可以根據伴隨這個分送,而且可在 http://www.eclipse.org/legal/cpl-v10.html 中取得的 Common Public License v1.0 的條款來使用