blob: 3a7581c2a27bf210f021795f2de21db2e8c85a92 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
<title>Defining an intro part</title>
</head>
<body>
<h2>Defining an intro part</h2>
<p>
The <a href="../reference/api/org/eclipse/ui/intro/IIntroPart.html"><b>IIntroPart</b></a> interface
and the <b><a href="../reference/extension-points/org_eclipse_ui_intro.html">org.eclipse.ui.intro</a></b>
extension point make up the generic mechanism that can be used to create your own intro support for
a given product. The main purpose of this extension is to define the class that implements
<a href="../reference/api/org/eclipse/ui/intro/IIntroPart.html"><b>IIntroPart</b></a> and to
specify the binding between a product id and an intro part. For example, the following contribution
defines a hypothetical intro part to be shown by the workbench on startup:
</p>
<pre>
&lt;extension
point="org.eclipse.ui.intro"&gt;
&lt;intro
class="com.example.SampleIntroPart"
id="someId"
icon="someIcon.png"&gt;
&lt;/intro&gt;
&lt;introProductBinding
introId="someId"
productId="com.example.someProductId"&gt;
&lt;/introProductBinding&gt;
&lt;/extension&gt;
</pre>
This contribution first defines the intro part and assigns it the id "someId". It then binds this
intro part to a product whose id is "com.example.someProductId". On platform startup, the class specified
in the <b>class</b> attribute will be instantiated by the workbench and presented to the user as the
introduction to the product. This is the lowest level integration into the
<a href="../reference/api/org/eclipse/ui/intro/IIntroPart.html"><b>IIntroPart</b></a>
interface.
<p>The platform supplies its own <a href="../reference/api/org/eclipse/ui/intro/IIntroPart.html"><b>IIntroPart</b></a>
implementation called <a href="../reference/api/org/eclipse/ui/intro/config/CustomizableIntroPart.html"><b>CustomizableIntroPart</b></a>
that allows for the content and presentation of the intro to be customized. Below is the snippet that defines the intro part for the workbench.
We won't go over the mechanics of implementing an intro part since we want to focus on defining
the intro content. (See the extension point documentation and javadoc referenced above for more detail
if you need it.)
</p>
<pre>
&lt;extension
point="org.eclipse.ui.intro"&gt;
&lt;intro
class="org.eclipse.ui.intro.config.CustomizableIntroPart"
id="org.eclipse.platform.intro"&gt;
&lt;/intro&gt;
&lt;introProductBinding
introId="org.eclipse.platform.intro"
productId="org.eclipse.platform"&gt;
&lt;/introProductBinding&gt;
&lt;/extension&gt;
</pre>
The above contribution defines the
<a href="../reference/api/org/eclipse/ui/intro/config/CustomizableIntroPart.html"><b>CustomizableIntroPart</b></a> as the
intro part to be used for the Eclipse SDK platform. The rest of this discussion shows you how to use and extend
this part.
</body>
</html>