| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html lang="en"> |
| <head> |
| <meta name="copyright" content="Copyright (c) IBM Corporation and others 2007, 2011. 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" type="text/javascript"></script> |
| <title>Defining intro content</title> |
| </head> |
| <body> |
| |
| <h2>Defining a minimal intro configuration</h2> |
| |
| <p> |
| The first stage in creating a new intro configuration is to add the necessary |
| extension points and create a minimal amount of content. This stage is often the |
| hardest. Below are the steps required to create a minimal intro configuration |
| and have it show up in a product.</p> |
| |
| <h3> |
| Create a plugin project and add extension points</h3> |
| |
| <p> |
| Create an new plugin project "org.eclipse.intro.minimal" which has a dependency |
| on org.eclipse.ui.intro. In the plugin manifest editor add the extension |
| org.eclipse.ui.intro. Edit plugin.xml until it looks like this:</p> |
| <pre><?xml version="1.0" encoding="UTF-8"?> |
| <?eclipse version="3.2"?> |
| <plugin> |
| <extension |
| point="org.eclipse.ui.intro"> |
| <intro |
| class="org.eclipse.ui.intro.config.CustomizableIntroPart" |
| icon="$nl$/icons/image_obj.gif" |
| id="org.eclipse.intro.minimal" |
| label="Minimal Intro"/> |
| </extension> |
| <extension |
| point="org.eclipse.ui.intro.config"> |
| <config |
| content="$nl$/introContent.xml" |
| id="org.eclipse.intro.minimal.config" |
| introId="org.eclipse.intro.minimal"> |
| <presentation |
| home-page-id="root" standby-page-id="standby"> |
| <implementation |
| kind="html"> |
| </implementation> |
| </presentation> |
| </config> |
| </extension> |
| </plugin></pre> |
| |
| <h3> |
| Create the intro config file</h3> |
| |
| <p> |
| Create a file introcontent.xml in the plugin project org.eclipse.intro.minimal |
| with these contents.</p> |
| <pre><?xml version="1.0" encoding="utf-8" ?> |
| <introContent> |
| <!-- Root page --> |
| <page id="root" style="html/style.css" style-id="page"> |
| <title style-id="intro-header">Minimal Intro</title> |
| <link url="http://org.eclipse.ui.intro/switchToLaunchBar" label="Go to theWorkbench" id="workbench" /> |
| <link label="Link to tutorials" url="http://org.eclipse.ui.intro/showPage?id=tutorials" id="tutorials" /> |
| </page> |
| |
| <!-- Standby page --> |
| <page id="standby" style="html/style.css" style-id="page"> |
| <title style-id="intro-header">Standby Page</title> |
| </page> |
| |
| <!-- Tutorials page --> |
| <page id="tutorials" style= "html/style.css" style-id="page"> |
| <title style-id="intro-header">Tutorials</title> |
| <text>This page under construction</text> |
| </page> |
| </introContent></pre> |
| <h3>Define a product binding</h3> |
| <p>In this step we need to determine the product which is being used and create |
| an intro product binding and modify its plugin.xml file. If you are using the |
| Eclipse SDK this will be in the plugin project org.eclipse.sdk which can |
| be found in the plugins directory of your Eclipse installation. The following |
| directions assume you are using the Eclipse SDK, with slight modifications these |
| will work equally well for an RCP or other Eclipse based product. Open |
| plugin.xml and locate the following section:</p> |
| <pre><extension |
| point="org.eclipse.ui.intro"> |
| <introProductBinding |
| introId="org.eclipse.ui.intro.universal" |
| productId="org.eclipse.sdk.ide"> |
| </introProductBinding> |
| </extension></pre> |
| <p>Change the introId to "org.eclipse.intro.minimal" so that the extension code |
| looks like this.</p> |
| <pre><extension |
| point="org.eclipse.ui.intro"> |
| <introProductBinding |
| introId="org.eclipse.intro.minimal" |
| productId="org.eclipse.sdk.ide"> |
| </introProductBinding> |
| </extension></pre> |
| <h3>Test and Customize</h3> |
| <p>Launch a new Eclipse application from your workbench. Your intro screen |
| may already be showing (depending on the state when Eclipse last exited). If it |
| is not showing select Help/Minimal Intro from the workbench menu. By editing the |
| file html/style.css you can modify the appearance of your intro. You can now |
| extend your intro either by editing the intro.xml file or by adding config |
| extensions.</p> |
| |
| </body> |
| </html> |