Displaying static HTML content in a CustomizableIntroPart

Just like any intro part implementation, to use a CustomizableIntroPart you need to follow the basic steps to bind it to a product. However, there is an extra step needed to use this intro part and it is binding a "configuration" with it. Just like you bind an intro to a product, you must bind an introConfig to a customizableIntroPart. Here is a sample configuration:

   <extension point="org.eclipse.ui.intro.config">
      <config
            id="static001_configId"
            introId="org.eclipse.ui.intro.examples.static_introId"
            content="introContent.xml">
         <presentation
               home-page-id="homePageId" 
               standby-page-id="standbyPageId">
            <implementation
                  os="win32"
                  kind="html"/> 
            <implementation
                  kind="swt"/>
         </presentation>
      </config>
   </extension> 

In the above contribution a configuration is registered with an intro part with id org.eclipse.ui.intro.examples.static_introId. (It is assumed that this intro part is a customizable intro part instance that has already been registered with the workbench). This configuration defines the content to be presented in the intro part and dictates how it is presented to the user.  The content is defined in an xml markup file, introContent.xml, while the presentation is dictated by two implementation elements in the markup.

A config presentation can be either an SWT browser based or a UI forms based presentation. In the above contribution, the presentation will be "html", ie browser based on win32 platforms, while it will be "swt" ie: UI forms based on all other platforms. At runtime, when the workbench is trying to instantiate the CustomizableIntroPart, the operating system is determined and the correct implementation of the presentation is chosen.
Also, a home-page-id or root page needs to be specified as it will be the first page displayed by the customizableIntroPart. If a standby-page-id is also specified, it will be displayed in the intro part when the intro part is put into standby mode.

The details of what the content file can be found in the extension point documentation. For a simple example, and to contribute static content we will use the following as content:

   <introContent>
      <page
            id="homePageId"
            url="http://eclipse.org"/>
      <page
            id="standbyPageId"
            url="./static001/standby.html"/>
   </introContent> 

In the above contribution, a simple url is used as the root page, in this case is a url pointing to the eclipse.org web site. This was done for simplicity. The root page could have been any html file, for example, a local html file that loads a flash demo. There is also a standby page defined that will be displayed when the intro is placed into standby mode.