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

Dynamic content

What is dynamic content?

Several user assistance components allow you to provide dynamic content. This means the content can change depending on the user's environment or context. For example, you may want a section of your help document or welcome page to only appear if the user has a certain functionality enabled.

There are two basic ways to create dynamic content. One is to add tags and attributes (annotations) to your XML markup instructing the system to filter out sections or documents, include sections from other documents, or extend documents by contributing into anchors or replacing elements.

The other method is to write your own content producer by plugging in some Java code that will write the content from scratch or process existing static documents on-the-fly. Let's examine both approaches.

XML Annotations

The simplest way to create dynamic content is to use the XML markup annotations. You simply add some special attributes and tags to your XML markup and the system will process the instructions. You can use this markup to:
  • Filter out documents or parts of documents
  • Include sections from other documents, and
  • Extend documents using anchors, contributions, and replacements.

To learn more about each aspect of the markup, follow the links above or find the topics in the table of contents.

This is demonstrated in the XHTML fragment shown below:

This is a static paragraph.

<!-- This tag will be replaced with the referenced tag -->
<include path=""/>

      This is a static list item.
      This only shows when running on Windows and plugin com.myplugin is not installed.
         <systemTest property="osgi.os" value="win32"/>
            <with variable="platform">
               <test property="org.eclipse.core.runtime.isBundleInstalled" args="com.myplugin"/>

<!-- An element with an id that can be replaced by another element -->
<p id="my.paragraph">
   This paragraph can be replaced because it has an id.

<!-- A place where others can add content -->
<anchor id=""/>

Content producers

A content producer is a mechanism for plugging-in Java code to produce the document content on-the-fly. Content producers are more powerful than XML annotations, but are more complex to use.

Content producers are supported in the following areas of user assistance:

  • Welcome XML/XHTML
  • Help topics (any format)
  • Help table of contents
  • Help keyword index
  • Context-sensitive help

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