목차(TOC)

org.eclipse.help.toc

개별 플러그인의 온라인 도움말 컨트리뷰션을 등록합니다.

도움말 파일을 제공하는 플러그인에서는 일반적으로 다음과 같은 작업을 수행합니다.

선택적으로 첫 번째 검색 시도의 성능을 위해 index 요소를 사용하여 검색 색인을 사전 빌드하고 등록할 수 있습니다. 플러그인당 하나의 색인만 등록할 수 있습니다. 복수 index 요소는 정의되지 않은 동작을 가져옵니다.

<!ELEMENT extension (toc* , index?)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT toc EMPTY>

<!ATTLIST toc

file     CDATA #REQUIRED

primary  (true | false) "false"

extradir CDATA #IMPLIED>


<!ELEMENT index EMPTY>

<!ATTLIST index

path CDATA #REQUIRED>

(3.1 이후) 이 플러그인이 제공하는 문서에서 작성되는 사전 빌드된 검색 색인의 선언을 허용하는 선택적 요소입니다.



다음은 목차 컨텍스트 확장점 사용에 관한 예제입니다.

(plugin.xml 파일의 경우)

 

<extension point=

"org.eclipse.help.toc"

>

<toc file=

"maindocs.html"

primary=

"true"

/>

<toc file=

"task.xml"

/>

<toc file=

"sample.xml"

extradir=

"samples"

/>

<index path=

"index/"

/>

</extension>

(maindocs.xml 파일의 경우)

<toc label="Help System Example">
 <topic label="Introduction" href="intro.html"/>
 <topic label="Tasks">
  <topic label="Creating a Project" href="tasks/task1.html">
   <topic label="Creating a Web Project" href="tasks/task11.html"/>
   <topic label="Creating a Java Project" href="tasks/task12.html"/>
  </topic>
  <link toc="task.xml" />
  <topic label="Testing a Project" href="tasks/taskn.html"/>
 </topic>
 <topic label="Samples">
  <topic label="Creating Java Project" href="samples/sample1.html">
   <topic label="Launch a Wizard" href="samples/sample11.html"/>
   <topic label="Set Options" href="samples/sample12.html"/>
   <topic label="Finish Creating Project" href="samples/sample13.html"/>
  </topic>
  <anchor id="samples" />
 </topic>
</toc>


(tasks.xml 파일의 경우)

<toc label="Building a Project">
 <topic label="Building a Project" href="build/building.html">
  <topic label="Building a Web Project" href="build/web.html"/>
  <topic label="Building a Java Project" href="build/java.html"/>
 </topic>
</toc>


(samples.xml 파일의 경우)

<toc link_to="maindocs.xml#samples" label="Using The Compile Tool">
 <topic label="The Compile Tool Sample" href="compilesample/example.html">
  <topic label="Step 1" href="compilesample/step1.html"/>
  <topic label="Step 2" href="compilesample/step2.html"/>
  <topic label="Step 3" href="compilesample/step3.html"/>
  <topic label="Step 4" href="compilesample/step4.html"/>
 </topic>
</toc>

"samples"로 시작하는 경로를 사용하는 다른 문서가 있을 경우 탐색 트리에는 표시되지 않지만 검색을 사용하여 이 문서에 액세스할 수 있습니다. 이는 plugin.xml 파일의 <toc file="sample.xml" extradir="samples" /> 요소에 "extradir" 속성이 있기 때문입니다. 예를 들어, "Creating Java Project"를 검색할 경우 경로가 samples/sample2.html인 "Other Ways of Creating Java Project" 문서를 리턴할 수 있습니다.

국제화 TOC 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 파일을 작성하고 doc.zip을
nl/<language>/<country> 또는 nl/<language> 디렉토리에 저장하여 지역화할 수 있습니다. 도움말 시스템은 이 디렉토리에서 파일을 찾은 후 플러그인 디렉토리를 기본 디렉토리로 지정합니다.
 

이 확장점을 사용하기 위한 코드는 필요하지 않습니다. plugin.xml 파일에서 언급한 해당 Manifest 파일을 제공하기만 하면 됩니다.

Eclipse 플랫폼과 함께 제공된 도움말 시스템 UI의 기본 구현에서는 목차 확장점을 완전히 지원합니다.