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

Using XHTML as intro content

Depending on the usage scenario of the intro framework, XHTML files can be contributed as intro content. The idea is to use the fact that XHTML is well formed XML and parse each document, manipulating the DOM to allow for contributions and extensions to be merged. Three xml elements from the 3.0 intro markup where used to extend the XHTML 1.0 element list. These where include, anchor, and contentProvider.

  •   include: this element can be added to a valid XHTML document to include content from another XHTML document. The content to be included must be a valid XHTML snippet.
e.g.: <include path="root/foo" /> will include an element with id foo from a welcome page with id root.
  •   anchor: this element can be added to a valid XHTML document to declare that content can be contributed to this page by other welcome contributions. A page declares locations that are suitable to be extended by defining these anchor points.
e.g.: <anchor id="anchor1" /> will allow for contribution into this page from other plugins.
  • contentProvider: this element can be added to a valid XHTML document to establish a hook into the workbench. When the intro framework encounters this element, an interface is called allowing for the manipulation of the DOM of the XHTML page.   
e.g.: <contentProvider id="contentProviderId" class="org.eclipse.ui.intro.template2.IntroXHTMLContentProvider" pluginId="org.eclipse.ui.intro.template2"> </contentProvider>
 will allow for dynamic content to be generated from the org.eclipse.ui.intro.template2.IntroXHTMLContentProvider class.

With these three elements, XHTML pages can be used to assemble a pluggable and dynamic welcome pages, just like what used to happen with the custom intro xml markup. PDE has a new template that allow for the creation of a sample RCP application with an Intro. That template is a good sample project for using Intro.


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