Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse Plug-in Developer Guide
Previous Page Home Next Page

Completing the plug-in manifest

We started this example by creating our plug-in and document files. Next we created toc files to describe the organization of our content. The remaining piece of work is to pull everything together into a master toc and update our plugin.xml to actually contribute the master toc. 

We start by creating a toc.xml to contribute the three tocs we created initially.  Instead of providing an href for each topic, we use the link attribute to refer to our existing toc files.

<toc label="Online Help Sample" topic="html/book.html">
	<topic label="Concepts">
		<link toc="toc_Concepts.xml" />
	<topic label="Tasks">
		<link toc="toc_Tasks.xml" />
	<topic label="Reference">
		<link toc="toc_Ref.xml" />

Then we update the plugin.xml to contribute our master toc:

   <extension point="">
      <toc file="toc.xml" primary="true" />

Note the use of the primary attribute.  Setting this attribute to true indicates that the toc should always appear in the navigation, even if it is not referenced by any other toc.  This way, our "master" toc is always guaranteed to show up in the topics list.  It appears at the top level list of books since no other toc references it. 
: If more files were associated with this toc but not present in the navigation, but just linked from other topics, then to have those topics available to the search engine we would have to use the extradir attribute in the toc.

Finally, we contribute our individual toc files.

   <extension point="">
       <toc file="toc_Concepts.xml" />
       <toc file="toc_Tasks.xml" />
       <toc file="toc_Reference.xml" />

These toc files will not appear in the top level list of books because we did not set the primary attribute.  Toc files that are not designated as primary will only appear in the documentation web if they are referred to from some toc that is a primary toc or is linked in by a primary toc.

That's it. If you copy your plug-in directory to the platform's plugins directory, start the platform, and choose Help->Help Contents, you should see your example appear in the list of books. If you click on the "Online Help Sample", you'll see your toc structure:

On-line help browser with sample book structure

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire