Intro Part Configuration

Identifier:
org.eclipse.ui.intro.config

Since:
3.0

Description:
This extension point is used to register an intro configuration. This configuration provides presentation implementations and content for a given intro contribution. An intro appears when the workbench is first launched and as a choice from the "Help" menu. The intro is typically used to introduce a user to a product built on Eclipse.

The intros are organized into pages which usually reflect a particular category of introductory material. For instance, a What's New page may introduce new concepts or functionality since previous versions. The content defined by one intro configuration can be referenced and extended from other plug-ins using the org.eclipse.ui.intro.configExtension extension point.

This document describes the intro content file structure as a series of DTD fragments.

Configuration Markup:

<!ELEMENT extension (config)+>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT config (presentation)>

<!ATTLIST config

introId    IDREF #REQUIRED

id         CDATA #REQUIRED

content    CDATA #REQUIRED

configurer CDATA #IMPLIED>

A config element can be used to configure a customizable Intro Part. A config element must specify an id, an introId, and a content file. The intro content file is an XML file that describes the pages, groups and links that the intro has.



<!ELEMENT presentation (implementation+ , launchBar?)>

<!ATTLIST presentation

home-page-id    CDATA #REQUIRED

standby-page-id CDATA #IMPLIED>

Presentation element that defines all the possible implementations of an intro part's presentation. It can have one or more implementation defined in it. Only one implementation will be chosen at startup, based the os/ws attributes of the implementations. Otherwise, the first one with no os/ws attributes defined will be chosen.



<!ELEMENT implementation (head?)>

<!ATTLIST implementation

kind  (swt|html)

style CDATA #IMPLIED

os    CDATA #IMPLIED

ws    CDATA #IMPLIED>

The presentation of the Platform's out of the box experience has two implementations. One of them is SWT Browser based, while the other is UI Forms based. The customizable intro part can be configured to pick one of those two presentations based on the current OS and WS. The type of the implementation can be swt or html.



<!ELEMENT launchBar (handle? , shortcut*)>

<!ATTLIST launchBar

location (left|bottom|right|fastview) "fastview"

bg       CDATA #IMPLIED

fg       CDATA #IMPLIED

computed (true | false) "false">

Launch bar works in conjuction with 'switchToLaunchBar' command. When executed, the command will close intro and create a launch bar in one of the trim areas of the main window. The launch bar will contain at least one button that would allow users to return to the last intro page. Optionally, it can contain additional buttons defined using shortcut elements. These buttons can be used to quickly go to a certain intro page. since 3.1



<!ELEMENT shortcut EMPTY>

<!ATTLIST shortcut

tooltip CDATA #IMPLIED

icon    CDATA #REQUIRED

url     CDATA #REQUIRED>

a button will be created in the intro launch bar for each shortcut element. The URL defined in the shortcut will be executed when the button is pressed. since 3.1



The handle element is deprecated

<!ELEMENT handle EMPTY>

<!ATTLIST handle

close (true | false) "true"

image CDATA #IMPLIED>

an optional element that controls how launch bar handle is rendered. since 3.1. Deprecated because the workbench now handles all aspects of window trim.



<!ELEMENT introContent ((page | group)+ | (extensionContent | replacementContent))>

The introContent element defines the body of the intro content file. The content file is made up of pages, shared groups that can be included in multiple pages, extensions to anchor points defined in other configurations, or replacements of existing elements.



<!ELEMENT page (group | link | text | head | img | include | html | title | anchor | contentProvider)+>

<!ATTLIST page

id           CDATA #REQUIRED

url          CDATA #IMPLIED

style        CDATA #IMPLIED

alt-style    CDATA #IMPLIED

filteredFrom (swt|html)

content      CDATA #IMPLIED

style-id     CDATA #IMPLIED

shared-style (true | false)

bgImage      CDATA #IMPLIED>

This element is used to describe a page to be displayed. The intro can display both dynamic and static pages. Content for dynamic pages is generated from the subelements of the page, described below. The style or alt-style will be applied depending on the presentation. The styles can be further enhanced by referencing the id or class-id.

Static pages allow for the reuse of existing HTML documents within one's introduction, and can be linked to from any static or dynamic page. Static pages are not defined in a page element, they are simply html files that can be linked to by other pages.

The home page, whose id is specified in the presentation element of the intro config extension point, can have a url indicating that it is a static page. If no url is specified then the home page is assumed to be dynamic. All other pages described using the page element are dynamic. Also note that when the SWT presentation is used and a static page is to be displayed, an external brower is launched and the current page remains visible.

The subelements used in a dynamic page are as follows: A group subelement is used to group related content and apply style across the grouped content. A link subelement defines a link which can be used to link to a static or dynamic page and run an intro action/command. A link is normally defined at the page level to navigate between main pages versus links within a page. A text subelement defines textual content at the page level. A head subelement is only applicable for the Web based presentation and allows for additional html to be added to the HTML head section. This is useful for adding java scripts or extra style sheets. An img subelement defines image content for the page level. An include subelement allows for reuse of any element other than a page. An html subelement is only applicable for the Web based presentation and allows for the embedding or inclusion of html into the page's content. Embedding allows for a fully defined html file to be embeded within an HTML object by referencing the html file. Inclusion allows for including an html snippet directly from an html file. A title subelement defines the title of the page. An anchor subelement defines a point where external contributions can be made by an <extensionContent> element.



<!ELEMENT group (group | link | text | img | include | html | anchor | contentProvider)*>

<!ATTLIST group

id           CDATA #REQUIRED

label        CDATA #IMPLIED

style-id     CDATA #IMPLIED

filteredFrom (swt|html)

computed     (true | false) "false"

bgImage      CDATA #IMPLIED

expandable   (true | false) "false"

expanded     (true | false) "false">

Used to group related content, content that should have similar style applied, or content that will be included together in other pages.



<!ELEMENT head EMPTY>

<!ATTLIST head

src      CDATA #REQUIRED

encoding CDATA #IMPLIED>

Direct HTML to include in a page's HEAD content area. It allows for additional html to be added to the HTML HEAD section. This is useful for adding java srcipts or extra styles sheets. If the content contains substitution segments of the form $plugin:plugin_id$ then they will be replaced with the absolute path to the plugin with id plugin_id. This markup is only to be used with an HTML based intro part implementation. It is simply ignored in the case of a UI Forms implementation. A page can have more than one head element. An implementation can have one and only one head element (since it is a shared across all pages).



<!ELEMENT title EMPTY>

<!ATTLIST title

id           CDATA #IMPLIED

style-id     CDATA #IMPLIED

filteredFrom (swt|html) >

a snippet of text that can optionally contain escaped HTML tags. It is only used as a Page Title, and so a given page can have a maximum of one title element.



<!ELEMENT link (text? , img?)>

<!ATTLIST link

url          CDATA #REQUIRED

id           CDATA #IMPLIED

label        CDATA #IMPLIED

style-id     CDATA #IMPLIED

filteredFrom (swt|html) >

Can link to a static HTML file, an external web site, or can run an Intro URL action.



<!ELEMENT text EMPTY>

<!ATTLIST text

id           CDATA #IMPLIED

style-id     CDATA #IMPLIED

filteredFrom (swt|html) >

a snippet of text that can optionally contain escaped HTML tags. It can include b and li tags. It can also contain anchors for urls. If multiple paragraphs are needed, then the text can be divided into multiple sections each begining and ending with the p tag.



<!ELEMENT img EMPTY>

<!ATTLIST img

src          CDATA #REQUIRED

id           CDATA #IMPLIED

alt          CDATA #IMPLIED

style-id     CDATA #IMPLIED

filteredFrom (swt|html) >

An image that represents intro content and not presentation (as opposed to decoration images defined in styles).



<!ELEMENT html (img | text)>

<!ATTLIST html

id           CDATA #REQUIRED

src          CDATA #REQUIRED

type         (inline|embed)

style-id     CDATA #IMPLIED

filteredFrom (swt|html)

encoding     CDATA #IMPLIED>

direct HTML to include in the page either by embedding the entire document, or inlining a snippet of HTML in-place. A fallback image or text must be defined for alternative swt presentation rendering. If the content contains substitution segments of the form $plugin:plugin_id$ then they will be replaced with the absolute path to the plugin with id plugin_id.
Embedding allows for a fully defined html file to be embedded within the dynamic page's content. An HTML object element is created that references the html file.
Inclusion allows for including an html snippet directly from a file into the dynamic html page.



<!ELEMENT include EMPTY>

<!ATTLIST include

path        CDATA #REQUIRED

configId    CDATA #IMPLIED

merge-style (true | false) >

expands an element targeted by the given path and optional configId attributes. Path should uniquely address an element within the specified configuration. It could point to a shared group defined at the configuration level, or any element in a page.



<!ELEMENT anchor EMPTY>

<!ATTLIST anchor

id CDATA #REQUIRED>

an anchor is the element used to declare extensibility. It is a location in the configurtaion that allows for external contributions. Only anchors are valid target values for the path attribute in an extensionContent



<!ELEMENT extensionContent (text | group | link | html | include)+>

<!ATTLIST extensionContent

path      CDATA #REQUIRED

style     CDATA #IMPLIED

alt-style CDATA #IMPLIED

content   CDATA #IMPLIED

id        CDATA #IMPLIED

name      CDATA #IMPLIED>

The content to be added to the target anchor. Only one extensionContent or replacementContent is allowed in a given configExtension because if this extension could not be resolved (if the config could not be found, or the target anchor could not be found) then the pages and/or groups in the extension need to be ingnored.



<!ELEMENT replacementContent (text | group | link | html | include)+>

<!ATTLIST replacementContent

path      CDATA #REQUIRED

style     CDATA #IMPLIED

alt-style CDATA #IMPLIED

content   CDATA #IMPLIED>

(since 3.3) The content to replace the target element. Only one extensionContent or replacementContent is allowed in a given configExtension because if this extension could not be resolved (if the config could not be found, or the target element could not be found) then the pages and/or groups in the extension need to be ignored.



<!ELEMENT contentProvider (text?)>

<!ATTLIST contentProvider

id       CDATA #REQUIRED

class    CDATA #REQUIRED

pluginId CDATA #IMPLIED>

A proxy for an intro content provider, which allows an intro page to dynamically pull data from various sources (e.g., the web, eclipse, etc) and provide content at runtime based on this dynamic data. If the IIntroContentProvider class that is specified in the class attribute can not be loaded, then the contents of the text element will be rendered instead. This is a dynamic version of the html intro tag. While the html tag allows for embedding or inlining a static html content into the generated html intro page, the contentProvider tag allows for dynamic creation of that content at runtime. Another difference between the tags is that the html tag is only supported for the HTML presentation, while this contentProvider tag is supported for both the HTML and SWT presentations. Since 3.0.1



<!ELEMENT hr EMPTY>

<!ATTLIST hr

id           CDATA #IMPLIED

style-id     CDATA #IMPLIED

filteredFrom (swt|html) >

a horizontal rule.



Examples:
Here is a sample usage of the config extension point.


<extension id="intro" point="org.eclipse.ui.intro.config">
   <config
      introId="com.org.xyz.intro"
      id="com.org.xyz.introConfig"
      content="introContent.xml">
      <presentation
         home-page-id="root"
         title="%intro.title">
         <implementation
            ws="win32"
            style="css/shared.css"
            kind="html"
            os="win32">
         </implementation>
         <implementation
            style="css/shared_swt.properties"
            kind="swt">
         </implementation>
      </presentation>
   </config>
</extension>

API Information:
For further details see the spec for the org.eclipse.ui.intro.config API package.

Supplied Implementation:
The intro contributed by the org.eclipse.platform plugin is the only implementation within Eclipse.


Copyright (c) 2004, 2006 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html