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
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

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

  




 

 

Eclipse Plug-in Developer Guide
Previous Page Home Next Page

Includes

Includes are used include parts of other documents into your document. The markup specifies the document and element to include, and before the document is shown to the user, the include element will be replaced with the element referred to.

For example, you may wish to show a copyright at the end of each help document you provide. You could copy and paste it in each document, but if the copyright changes (e.g. the copyright year), you have to modify every one of your documents.

Instead, you can place the copyright in a separate XHTML file called copyright.xhtml and assign it a unique identifier, like this:

   <p id="copyright">
      Copyright 2006 My Company. All rights reserved.
   </p>

Then for each document, simply include the copyright paragraph:

   <p>
      This is my document. It should have a copyright at the end.
   </p>
   <include path="my.plugin.id/path/copyright.xhtml/copyright"/>

Before the document is sent to the browser to be displayed, the include element will be replaced by the copyright paragraph.

Where can I use includes?

See below for a list of the document types in which includes can be used. The format of the path element of the include depends on the type of document you're including from. As you can see in the example above, the format for XHTML help documents is "<plugin_id>/<path_to_file>/<element_id>". Refer to the links below for the format for your document type.


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