| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | 
 | <html> | 
 | <head> | 
 | <meta http-equiv=Content-Type content="text/html; charset=utf-8"/> | 
 | <link rel="stylesheet" type="text/css" href="../default_style.css"/> | 
 | <title>Creating Welcome page for your Product</title> | 
 |  | 
 | </head> | 
 |  | 
 | <body> | 
 |  | 
 | <h1>Creating Welcome page for your Product</h1> | 
 |  | 
 | <h2>Summary</h2> | 
 |  | 
 | <p>Intro page support in eclipse allows plug-ins to | 
 | define pages that help introduce the product to the end user the first time the | 
 | platform is started. This tutorial walks you through the process of creating a | 
 | simple welcome page for an Eclipse Rich Client Platform (RCP) product.</p> | 
 |  | 
 | <p>By: Zhuo Zhang, IBM, zhuoz@cn.ibm.com</p> | 
 |  | 
 | <h2>Introduction</h2> | 
 |  | 
 | <p>Eclipse allows you to define "welcome pages" | 
 | for your product. Welcome pages are intended to guide users into discovering a | 
 | product's functionality. Generally, they are shown the first time a product is | 
 | started.</p> | 
 |  | 
 | <h3>Prerequisite</h3> | 
 |  | 
 | <p>First, you should create a simple eclipse | 
 | product with product id: <i>com.sample.application.product</i>. | 
 | To simplify the implementation, we just define a perspective and simple view in | 
 | it. </p> | 
 |  | 
 | <p>The general information for this product:</p> | 
 |  | 
 | <p align="center"><img width=416 height=245 src="images/image002.jpg"/><br/>Picture 1</p> | 
 |  | 
 | <p>You can get the corresponding information in MANIFEST.MF:</p> | 
 |  | 
 | <pre>Manifest-Version: 1.0 | 
 | Bundle-ManifestVersion: 2 | 
 | Bundle-Name: %pluginName | 
 | Bundle-SymbolicName: com.sample.application; singleton:=true | 
 | Bundle-Version: 1.0.0 | 
 | Bundle-Activator: com.sample.application.SamplePlugin | 
 | Bundle-Vendor: %providerName | 
 | Bundle-Localization: plugin | 
 | Require-Bundle: org.eclipse.ui, | 
 |  org.eclipse.core.runtime | 
 | Eclipse-AutoStart: true | 
 | Bundle-ClassPath: sampleproduct.jar | 
 | Export-Package: com.sample.application, | 
 |  com.sample.application.view</pre> | 
 |  | 
 | <p>Hint: programmer is preferred to modify the general information in | 
 | GUI panel in Picture 1.</p> | 
 |  | 
 | <p>The plugin.xml for this product is:</p> | 
 |  | 
 | <pre>1 <?xml version="1.0" encoding="UTF-8"?> | 
 | 2 <?eclipse version="3.0"?> | 
 | 3  <plugin> | 
 | 4    <extension id="SampleApplication" name="SampleApplication"  | 
 | 5      point="org.eclipse.core.runtime.applications"> | 
 | 6      <application> | 
 | 7        <run class="com.sample.application.SampleApplication"/> | 
 | 8      </application> | 
 | 9    </extension> | 
 | 10    <extension id="product" point="org.eclipse.core.runtime.products"> | 
 | 11      <product application="com.sample.application.SampleApplication"  | 
 | 12        description="%productBlurb" name="Sample Application" | 
 | 13        <property name="windowImages" value="winimage.gif "/> | 
 | 14        <property name="appName" value="%appName"/> | 
 | 15      </product> | 
 | 16    </extension> | 
 | 17    <extension point="org.eclipse.ui.perspectives"> | 
 | 18      <perspective class="com.sample.application.SamplePerspective" fixed="false" | 
 | 19          id="com.sample.application.SamplePerspective" name="%sampleperspective"/> | 
 | 20    </extension> | 
 | 21    <extension point="org.eclipse.ui.views"> | 
 | 22      <view allowMultiple="false" class="com.sample.application.view.DefaultView" | 
 | 23        icon="icons/navigator.gif" id="com.sample.application.view.DefaultView" | 
 | 24        name="%sampleview"/> | 
 | 25    </extension> | 
 | 26 </plugin></pre> | 
 |  | 
 | <p>Line 4-9: define an application with application id: com.sample.application.SampleApplication | 
 | (pluginID+"."+applicationID);</p> | 
 |  | 
 | <p>Line 10-16: define the product with product id: com.sample.application.product.</p> | 
 | <blockquote> | 
 | 	<p>Product configuration link: <a | 
 | 	href="http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/product_configproduct.htm">http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/product_configproduct.htm</a></p> | 
 | 	 | 
 | 	<p>Hint: property "welcomePage" is discouraged in Eclipse 3.0 in | 
 | 	favor of the <code>org.eclipse.ui.intro</code> extension point, which will be introduced in | 
 | 	this article.</p> | 
 | </blockquote> | 
 | <p>Line 17-20: define the perspective;</p> | 
 |  | 
 | <p>Line 21-25: define the sample view.</p> | 
 |  | 
 | <h3>Create an Intro Part Plugin</h3> | 
 |  | 
 | <p>Select <b>File > New > Project</b>, select <b>Plug-in Project</b> in  | 
 | <b> Plug-in Development</b> and click <b>Next</b>. | 
 | Input the project name as "<i>com.sample.application.intro</i>", | 
 | unselect <b>Create a Java project</b>, click <b>Next</b></p> | 
 |  | 
 | <p><img border=0 width=526 height=499 src="images/image004.jpg"/></p> | 
 |  | 
 | <p>Change the Plug-in Name to "%pluginName" and Plug-in Provider to  | 
 | "%providerName", click <b>Finish</b>.</p> | 
 |  | 
 | <p><img border=0 width=525 height=501 src="images/image006.jpg"></p> | 
 |  | 
 | <p>Now you can see the new created project in | 
 | your package explore. In this project, create a file named "plugin.properties" | 
 | in the same folder with plugin.xml.</p> | 
 |  | 
 | <p><img border=0 width=175 height=33 src="images/image008.jpg"></p> | 
 |  | 
 | <p>Open plugin.properties, add the following to its contents, and save it. </p> | 
 |  | 
 | <pre>pluginName=Simple Product Intro | 
 | providerName=ZZ</pre> | 
 |  | 
 | <blockquote> | 
 | 	<p>Hint: for things like <i>%variableName</i>in plugin.xml and MANIFEST.MF,  | 
 | 	eclipse will automatically find them in <code>plugin.properties</code>.  | 
 | 	In our example, Eclipse will change %pluginName to "Simple | 
 | 	Product Intro" when the plug-in's name is displayed.</p> | 
 | 	 | 
 | 	<p>Hint: it’s a good habit to define the meta-information such as | 
 | 	name, version, and description in plugin.properties and use them by variable. | 
 | 	It’s easy to maintain and provide international language support.</p> | 
 | </blockquote> | 
 |  | 
 | <h3>Define plugin.xml</h3> | 
 |  | 
 | <p>Double click plugin.xml, by default a plugin editor will be shown:</p> | 
 |  | 
 | <blockquote> | 
 | 	<p>Hint: if eclipse doesn’t open the following editor, select the | 
 | 	plugin.xml in Package Explore, right click, in popup menu select <b>Open | 
 | 	with > Plug-in Manifest Editor.</b></p> | 
 | </blockquote> | 
 |  | 
 | <p><img border=0 width=553 height=343 src="images/image010.jpg"></p> | 
 |  | 
 | <p>Select the "Extensions" tab, add an extension to | 
 | the "org.eclipse.ui.intro" extension point, and set the value as follows:</p> | 
 |  | 
 | <p><img border=0 width=553 height=104 src="images/image012.jpg"></p> | 
 |  | 
 | <p>Select "org.eclipse.ui.intro", right click, select <b>New > intro</b>, and set | 
 | the value as follows:</p> | 
 |  | 
 | <p><img border=0 width=554 height=84 src="images/image014.jpg"></p> | 
 |  | 
 | <p>Here we | 
 | directly use class <code>org.eclipse.ui.intro.config.CustomizableIntroPart</code>, it is | 
 | re-usable intro part class defined in the Eclipse platform. It is a | 
 | customizable intro part where its content can be customized based on a | 
 | configuration file (xml format) and its both its presentation can be customized | 
 | based on a set of css file, which is contributed using the | 
 | <code>org.eclipse.ui.intro.config</code> extension point. The configuration file will be | 
 | declared in following extension to <code>org.eclipse.ui.intro.config</code> and its content | 
 | will be shown in coming section.</p> | 
 |  | 
 | <p>Of course, you can use any class which implements the <code>org.eclipse.ui.intro.IIntroPart</code> | 
 | interface.</p> | 
 |  | 
 | <p>The page must be bound to an Eclipse product. Select <code>org.eclipse.ui.intro</code>, right click, | 
 | select <b>New > introProductBinding</b>, and set the value as follows: </p> | 
 |  | 
 | <p><img border=0 width=553 height=70 src="images/image016.jpg"></p> | 
 |  | 
 | <p>Create an extension to <code>org.eclipse.ui.intro</code>, and set value as follows:</p> | 
 |  | 
 | <p><img border=0 width=554 height=72 src="images/image018.jpg"></p> | 
 |  | 
 | <p>Now we link the intro part | 
 | (<code>com.sample.application.intro</code>) with an intro configuration (<code>com.sample.application.introConfig</code>), | 
 | and declare the concrete configuration file (<code>introContent.xml</code>). Select <code>org.eclipse.ui.intro.config</code>, right click, select <b>New > config</b>, and | 
 | set the value as follows:</p> | 
 |  | 
 | <p><img border=0 width=553 height=81 src="images/image020.jpg"/></p> | 
 |  | 
 | <p>For home-page-id and standby-page-id (optional), they should be | 
 | page-ids defined in configuration file. (Link to page-id: <a href="http://help.eclipse.org/help31/topic/org.eclipse.platform.doc.isv/reference/extension-points/introContentFileSpec.html#e.page">http://help.eclipse.org/help31/topic/org.eclipse.platform.doc.isv/reference/extension-points/introContentFileSpec.html#e.page</a>.) | 
 | Select "com.sample.application.introConfig(config)", right click, select <b>New > presentation</b>, set the value as | 
 | follows. </p> | 
 |  | 
 | <p>In Eclipse 3.0 or above, welcome page has two of modes:</p> | 
 | <ul> | 
 | 	<li>Full mode (refer to <code>home-page-id</code>), the intro part takes over the main workbench area. </li> | 
 | 	<li>Standby mode (refer to <code>standby-page-id</code>), the intro part moves to the side, allowing the current | 
 | 	perspective to remain visible.</li> | 
 | </ul> | 
 |  | 
 | <p>The welcome page can switch between these two modes.</p> | 
 |  | 
 | <p><img border=0 width=554 height=82 src="images/image022.jpg"/></p> | 
 |  | 
 | <p>Then we | 
 | define a default implementation and a SWT implementation. In style field, we | 
 | define the default layout css file: <code>shared.css</code>.</p> | 
 |  | 
 | <p><img border=0 width=553 height=100 src="images/image024.jpg"/></p> | 
 |  | 
 | <p><img border=0 width=553 height=116 src="images/image026.jpg"/></p> | 
 |  | 
 | <p>For | 
 | supported operation systems listed in default implementation, Eclipse will use | 
 | the default implementation’s presentation style; for other operation systems, | 
 | Eclipse will use swt(implementation) presentation style. </p> | 
 |  | 
 | <h3>Customize Welcome page’s contents and layout</h3> | 
 |  | 
 | <p>Create the following folders and files:</p> | 
 |  | 
 | <p><img border=0 width=345 height=352 src="images/image028.jpg"/></p> | 
 |  | 
 | <p>The key file to | 
 | specify the contents is introContent.xml. You can find the XML schema definition | 
 | from: <a href="http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/extension-points/introContentFileSpec.html">http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/extension-points/introContentFileSpec.html</a></p> | 
 |  | 
 | <p><code>shared.css</code> define the default full-style | 
 | layout for specified operating system; <code>standby_root.css</code> define stand-by layout for supported | 
 | OS; <code>standby_swt.properties</code> define the standby layout for unspecified OS; | 
 | <code>swt.properties</code> define the full-style layout for unspecified OS.</p> | 
 |  | 
 | <p>Following are the detail of <code>introContent.xml</code>:</p> | 
 |  | 
 | <pre>1  <?xml version="1.0" encoding="utf-8" ?> | 
 | 2  <introContent> | 
 | 3   <page style="css/welcome/welcome.css" alt-style="css/welcome/swt.properties" id="overview" > | 
 | 4     <group id="page-topbar" > | 
 | 5       <img id="logo" style-id="topbar2"  | 
 | 6         src="./css/graphics/contentpage/banner_logo.jpg"/> | 
 | 7     </group> | 
 | 8     <group id="page-content"> | 
 | 9       <text style-id="page-title" id="page-title">WELCOME</text> | 
 | 10      <text style-id="page-description" id="page-description">Welcome! This is the  | 
 | 11        first welcome page for my product.</text> | 
 | 12      <group label="Sample Link Actions" id="simple-links" style-id="welcome-group"> | 
 | 13 | 
 | 14        <link label="Run Action Sample"  | 
 | 15          url="http://org.eclipse.ui.intro/runAction?pluginId=com.sample.application&amp;class=com.sample.application.view.ShowViewAction" id="runAction" | 
 | 16            style-id="welcome-link"> | 
 | 17          <text>This is a sample link to run action.</text> | 
 | 18        </link> | 
 | 19 | 
 | 20        <link label="Show External Link Sample"  | 
 | 21          url="http://org.eclipse.ui.intro/openBrowser?url=http://www.eclipse.org"id="openBrowser"  | 
 | 22          style-id="welcome-link"> | 
 | 23          <text>This is a sample to open a link in an new opened web brower.</text> | 
 | 24        </link> | 
 | 25 | 
 | 26        <link label="Show Internal Link Sample"  | 
 | 27          url="http://org.eclipse.ui.intro/openURL?url=./intro/css/welcome/about.html&amp;pluginId=com.sample.application.intro"  | 
 | 28          id="openURL"style-id="welcome-link"> | 
 | 29          <text>This is a sample to goto another internal link.</text> | 
 | 30        </link> | 
 | 31  | 
 | 32        <html label="Show Internal Link Sample" src="./css/welcome/bottom.html" br> | 
 | 33          id="test" style-id="welcome-anotherlink"> | 
 | 34          <text>This is a sample to goto another internal link.</text> | 
 | 35        </html>  | 
 | 36      </group> | 
 | 37    </group> | 
 | 38  </page> | 
 | 39  <page style="css/standby_root.css" alt-style="css/standby_swt.properties" id="standby" > | 
 | 40    <title style-id="intro-header">Standby Intro</title> | 
 | 41    <group id="links-background"> | 
 | 42      <group id="page-links"> | 
 | 43        <link label="Run Action Sample" | 
 | 44          url="http://org.eclipse.ui.intro/runAction?pluginId=com.sample.application&amp;class=com.sample.application.view.ShowViewAction"  | 
 | 45          id="runAction" style-id="welcome-link"> | 
 | 46          <text>This is a sample link to run action.</text> | 
 | 47        </link> | 
 | 48 | 
 | 49        <link label="Show External Link Sample" url 50="http://org.eclipse.ui.intro/openBrowser?url=http://www.eclipse.org"id="openBrowser" | 
 | 51          style-id="welcome-link"> | 
 | 52          <text>This is a sample to open a link in an new opened web brower.</text> | 
 | 53        </link> | 
 | 54  | 
 | 55        <link label="Show Internal Link Sample" label="Show Internal Link  | 
 | 56          url="http://org.eclipse.ui.intro/openURL?url=./intro/css/welcome/about.html&amp;pluginId=com.sample.application.intro" | 
 | 57          id="openURL" style-id="welcome-link"> | 
 | 58          <text>This is a sample to goto another internal link.</text> | 
 | 59        </link> | 
 | 60      </group> | 
 | 61    </group> | 
 | 62  </page>  | 
 | 63 </introContent></pre> | 
 |  | 
 | <!-- WTB I have edited this document, mostly for structure (and some content) up to this point. --> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;tab-stops:15.0pt 30.0pt 45.0pt 60.0pt 75.0pt 90.0pt 105.0pt 120.0pt 135.0pt 150.0pt 165.0pt 180.0pt 195.0pt 210.0pt 225.0pt 240.0pt 255.0pt 270.0pt 285.0pt 300.0pt; | 
 | mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US>Line2: The | 
 | introContent element defines the body of the intro content file. The content | 
 | file can be a group of pages, groups, and extensions to anchor points defined | 
 | in other configurations. In this example, we define two groups: group <b | 
 | style='mso-bidi-font-weight:normal'>overview</b> and group <b style='mso-bidi-font-weight: | 
 | normal'>standby</b>.</span></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;tab-stops:15.0pt 30.0pt 45.0pt 60.0pt 75.0pt 90.0pt 105.0pt 120.0pt 135.0pt 150.0pt 165.0pt 180.0pt 195.0pt 210.0pt 225.0pt 240.0pt 255.0pt 270.0pt 285.0pt 300.0pt; | 
 | mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US>Line 3: define | 
 | the <b style='mso-bidi-font-weight:normal'>overview</b> group, the general | 
 | layout is defined in “welcome.css” and the alternative layout (SWT layout) is | 
 | defined in “swt.css”.</span></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;tab-stops:15.0pt 30.0pt 45.0pt 60.0pt 75.0pt 90.0pt 105.0pt 120.0pt 135.0pt 150.0pt 165.0pt 180.0pt 195.0pt 210.0pt 225.0pt 240.0pt 255.0pt 270.0pt 285.0pt 300.0pt; | 
 | mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US>Line 8-37: | 
 | define the sample links and html contents</span></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;tab-stops:15.0pt 30.0pt 45.0pt 60.0pt 75.0pt 90.0pt 105.0pt 120.0pt 135.0pt 150.0pt 165.0pt 180.0pt 195.0pt 210.0pt 225.0pt 240.0pt 255.0pt 270.0pt 285.0pt 300.0pt; | 
 | mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US>Line 14-18: | 
 | define a link to run action. The source code for the com.sample.application is | 
 | attached in apendix1.</span></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;tab-stops:15.0pt 30.0pt 45.0pt 60.0pt 75.0pt 90.0pt 105.0pt 120.0pt 135.0pt 150.0pt 165.0pt 180.0pt 195.0pt 210.0pt 225.0pt 240.0pt 255.0pt 270.0pt 285.0pt 300.0pt; | 
 | mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US | 
 | style='color:green'>Hint:the value of <i>class</i> should be the fully | 
 | qualified class name of the class that implements one of </span><span | 
 | lang=EN-US style='font-size:9.0pt;color:green;background:white;mso-highlight: | 
 | white;mso-font-kerning:0pt'>org.eclipse.ui.intro.config.IIntroAction</span><span | 
 | lang=EN-US style='font-size:9.0pt;font-family:宋体;mso-hansi-font-family:"Times New Roman"; | 
 | mso-bidi-font-family:宋体;color:green;background:white;mso-highlight:white; | 
 | mso-font-kerning:0pt'>, </span><span lang=EN-US style='font-size:9.0pt; | 
 | color:green;background:white;mso-highlight:white;mso-font-kerning:0pt'>org.eclipse.jface.action.IAction</span><span | 
 | lang=EN-US style='font-size:9.0pt;font-family:宋体;mso-hansi-font-family:"Times New Roman"; | 
 | mso-bidi-font-family:宋体;color:green;background:white;mso-highlight:white; | 
 | mso-font-kerning:0pt'>, or </span><span lang=EN-US style='font-size:9.0pt; | 
 | color:green;background:white;mso-highlight:white;mso-font-kerning:0pt'>org.eclipse.ui.IActionDelegate.</span><span | 
 | lang=EN-US style='font-size:9.0pt;font-family:宋体;mso-hansi-font-family:"Times New Roman"; | 
 | mso-bidi-font-family:宋体;color:green;background:white;mso-highlight:white; | 
 | mso-font-kerning:0pt'><o:p></o:p></span></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;tab-stops:15.0pt 30.0pt 45.0pt 60.0pt 75.0pt 90.0pt 105.0pt 120.0pt 135.0pt 150.0pt 165.0pt 180.0pt 195.0pt 210.0pt 225.0pt 240.0pt 255.0pt 270.0pt 285.0pt 300.0pt; | 
 | mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US>Line 20-24: | 
 | define a link to show a page by opening a new browser</span></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;tab-stops:15.0pt 30.0pt 45.0pt 60.0pt 75.0pt 90.0pt 105.0pt 120.0pt 135.0pt 150.0pt 165.0pt 180.0pt 195.0pt 210.0pt 225.0pt 240.0pt 255.0pt 270.0pt 285.0pt 300.0pt; | 
 | mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US>Line 26-30: define | 
 | a link to show a page in welcome page</span></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;tab-stops:15.0pt 30.0pt 45.0pt 60.0pt 75.0pt 90.0pt 105.0pt 120.0pt 135.0pt 150.0pt 165.0pt 180.0pt 195.0pt 210.0pt 225.0pt 240.0pt 255.0pt 270.0pt 285.0pt 300.0pt; | 
 | mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US>Line 32-35: | 
 | define a html element<o:p></o:p></span></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;tab-stops:15.0pt 30.0pt 45.0pt 60.0pt 75.0pt 90.0pt 105.0pt 120.0pt 135.0pt 150.0pt 165.0pt 180.0pt 195.0pt 210.0pt 225.0pt 240.0pt 255.0pt 270.0pt 285.0pt 300.0pt; | 
 | mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US>Line 39: | 
 | define the <b style='mso-bidi-font-weight:normal'>standby </b>group (for | 
 | stand-by style), the layout is defined in “standby_root.css” and the alternative | 
 | layout (SWT layout) is defined in “standby_swt.properties”.</span></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;tab-stops:15.0pt 30.0pt 45.0pt 60.0pt 75.0pt 90.0pt 105.0pt 120.0pt 135.0pt 150.0pt 165.0pt 180.0pt 195.0pt 210.0pt 225.0pt 240.0pt 255.0pt 264.75pt; | 
 | mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US>Line 41-61: | 
 | define the same links as those in <b style='mso-bidi-font-weight:normal'>overview | 
 | </b>group.<span style='mso-tab-count:1'> </span></span></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;tab-stops:15.0pt 30.0pt 45.0pt 60.0pt 75.0pt 90.0pt 105.0pt 120.0pt 135.0pt 150.0pt 165.0pt 180.0pt 195.0pt 210.0pt 225.0pt 240.0pt 255.0pt 270.0pt 285.0pt 300.0pt; | 
 | mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US | 
 | style='font-size:9.0pt;font-family:宋体;mso-hansi-font-family:"Times New Roman"; | 
 | mso-bidi-font-family:宋体;color:teal;background:white;mso-highlight:white; | 
 | mso-font-kerning:0pt'><o:p> </o:p></span></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;tab-stops:15.0pt 30.0pt 45.0pt 60.0pt 75.0pt 90.0pt 105.0pt 120.0pt 135.0pt 150.0pt 165.0pt 180.0pt 195.0pt 210.0pt 225.0pt 240.0pt 255.0pt 270.0pt 285.0pt 300.0pt; | 
 | mso-layout-grid-align:none;text-autospace:none'><span lang=EN-US>The content of | 
 | standby_properties is:</span><span lang=EN-US style='font-size:9.0pt; | 
 | font-family:宋体;mso-hansi-font-family:"Times New Roman";mso-bidi-font-family: | 
 | 宋体;color:teal;background:white;mso-highlight:white;mso-font-kerning:0pt'><o:p></o:p></span></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;mso-layout-grid-align: | 
 | none;text-autospace:none'><span lang=EN-US style='font-size:9.0pt;font-family: | 
 | 宋体;mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:宋体;background: | 
 | white;mso-highlight:white;mso-font-kerning:0pt'>1 standby.links-background.page-links.layout.vspacing | 
 | = 30<o:p></o:p></span></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;mso-layout-grid-align: | 
 | none;text-autospace:none'><span lang=EN-US style='font-size:9.0pt;font-family: | 
 | 宋体;mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:宋体;background: | 
 | white;mso-highlight:white;mso-font-kerning:0pt'>2 standby.show-link-description | 
 | = true<o:p></o:p></span></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;mso-layout-grid-align: | 
 | none;text-autospace:none'><span lang=EN-US style='font-size:9.0pt;font-family: | 
 | 宋体;mso-hansi-font-family:"Times New Roman";mso-bidi-font-family:宋体;background: | 
 | white;mso-highlight:white;mso-font-kerning:0pt'>3 standby.show-home-page-navigation | 
 | = false<o:p></o:p></span></p> | 
 |  | 
 | <p class=MsoNormal align=left style='margin-left:5.25pt;text-align:left; | 
 | text-indent:-5.25pt;mso-char-indent-count:-.5'><span lang=EN-US>The complete | 
 | properties file definition can be found in: org.eclipse.ui.intro\empty_swt.properties.</span></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;mso-layout-grid-align: | 
 | none;text-autospace:none'><span lang=EN-US>You can fined the declaration for | 
 | above three lines in empty_swt.properties:</span><span lang=EN-US | 
 | style='font-size:10.0pt;font-family:"Courier New";color:black;background:white; | 
 | mso-highlight:white;mso-font-kerning:0pt'><o:p></o:p></span></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;text-indent:22.5pt; | 
 | mso-char-indent-count:2.5;mso-layout-grid-align:none;text-autospace:none'><i | 
 | style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:9.0pt; | 
 | mso-ascii-font-family:宋体;mso-bidi-font-family:宋体;background:white;mso-highlight: | 
 | white;mso-font-kerning:0pt'>……</span></i><i style='mso-bidi-font-style:normal'><span | 
 | lang=EN-US style='font-size:9.0pt;font-family:宋体;mso-hansi-font-family:"Times New Roman"; | 
 | mso-bidi-font-family:宋体;background:white;mso-highlight:white;mso-font-kerning: | 
 | 0pt'><o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;text-indent:22.5pt; | 
 | mso-char-indent-count:2.5;mso-layout-grid-align:none;text-autospace:none'><i | 
 | style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:9.0pt; | 
 | font-family:宋体;mso-hansi-font-family:"Times New Roman";mso-bidi-font-family: | 
 | 宋体;background:white;mso-highlight:white;mso-font-kerning:0pt'><pageId>.show-link-description | 
 | = true/false<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;mso-layout-grid-align: | 
 | none;text-autospace:none'><i style='mso-bidi-font-style:normal'><span | 
 | lang=EN-US style='font-size:9.0pt;font-family:宋体;mso-hansi-font-family:"Times New Roman"; | 
 | mso-bidi-font-family:宋体;background:white;mso-highlight:white;mso-font-kerning: | 
 | 0pt'><span style='mso-tab-count:1'>     </span>.show-link-description | 
 | = true/false<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;mso-layout-grid-align: | 
 | none;text-autospace:none'><i style='mso-bidi-font-style:normal'><span | 
 | lang=EN-US style='font-size:9.0pt;font-family:宋体;mso-hansi-font-family:"Times New Roman"; | 
 | mso-bidi-font-family:宋体;background:white;mso-highlight:white;mso-font-kerning: | 
 | 0pt'><span style='mso-tab-count:1'>     </span></span></i><i | 
 | style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:9.0pt; | 
 | mso-ascii-font-family:宋体;mso-bidi-font-family:宋体;background:white;mso-highlight: | 
 | white;mso-font-kerning:0pt'>……</span></i><i style='mso-bidi-font-style:normal'><span | 
 | lang=EN-US style='font-size:9.0pt;font-family:宋体;mso-hansi-font-family:"Times New Roman"; | 
 | mso-bidi-font-family:宋体;background:white;mso-highlight:white;mso-font-kerning: | 
 | 0pt'><o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;mso-layout-grid-align: | 
 | none;text-autospace:none'><i style='mso-bidi-font-style:normal'><span | 
 | lang=EN-US style='font-size:9.0pt;font-family:宋体;mso-hansi-font-family:"Times New Roman"; | 
 | mso-bidi-font-family:宋体;background:white;mso-highlight:white;mso-font-kerning: | 
 | 0pt'><span style='mso-tab-count:1'>     </span><pageId>.show-home-page-navigation | 
 | = true/false<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;mso-layout-grid-align: | 
 | none;text-autospace:none'><i style='mso-bidi-font-style:normal'><span | 
 | lang=EN-US style='font-size:9.0pt;font-family:宋体;mso-hansi-font-family:"Times New Roman"; | 
 | mso-bidi-font-family:宋体;background:white;mso-highlight:white;mso-font-kerning: | 
 | 0pt'><span style='mso-tab-count:1'>     </span>.show-home-page-navigation | 
 | = true/false<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;mso-layout-grid-align: | 
 | none;text-autospace:none'><i style='mso-bidi-font-style:normal'><span | 
 | lang=EN-US style='font-size:9.0pt;font-family:宋体;mso-hansi-font-family:"Times New Roman"; | 
 | mso-bidi-font-family:宋体;background:white;mso-highlight:white;mso-font-kerning: | 
 | 0pt'><span style='mso-spacerun:yes'>    </span></span></i><i | 
 | style='mso-bidi-font-style:normal'><span lang=EN-US style='font-size:9.0pt; | 
 | mso-ascii-font-family:宋体;mso-bidi-font-family:宋体;background:white;mso-highlight: | 
 | white;mso-font-kerning:0pt'>……</span></i><i style='mso-bidi-font-style:normal'><span | 
 | lang=EN-US style='font-size:9.0pt;font-family:宋体;mso-hansi-font-family:"Times New Roman"; | 
 | mso-bidi-font-family:宋体;background:white;mso-highlight:white;mso-font-kerning: | 
 | 0pt'><o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal align=left style='text-align:left;mso-layout-grid-align: | 
 | none;text-autospace:none'><i style='mso-bidi-font-style:normal'><span | 
 | lang=EN-US style='font-size:9.0pt;font-family:宋体;mso-hansi-font-family:"Times New Roman"; | 
 | mso-bidi-font-family:宋体;background:white;mso-highlight:white;mso-font-kerning: | 
 | 0pt'><span style='mso-tab-count:1'>     </span><pageId>.<path_to_group>.layout.vspacing | 
 | = <integer><o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal align=left style='margin-left:5.05pt;mso-para-margin-left: | 
 | .48gd;text-align:left;text-indent:5.0pt;mso-char-indent-count:.5'><span | 
 | lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black; | 
 | background:white;mso-highlight:white;mso-font-kerning:0pt'><span | 
 | style='mso-tab-count:1'>  </span></span><span lang=EN-US style='font-size: | 
 | 10.0pt;font-family:"Courier New";color:black;mso-font-kerning:0pt'><o:p></o:p></span></p> | 
 |  | 
 | <h3><span lang=EN-US style='font-size:15.0pt;line-height:173%'>Action to show | 
 | Welcome page<o:p></o:p></span></h3> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>1 public | 
 | class SampleActionBarAdvisor extends ActionBarAdvisor {<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>2<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>3<span | 
 | style='mso-tab-count:1'>     </span>private IWorkbenchAction | 
 | intro;<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>4<span | 
 | style='mso-tab-count:1'>     </span>public | 
 | SampleActionBarAdvisor(IActionBarConfigurer configurer) {<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>5<span | 
 | style='mso-tab-count:2'>            </span>super(configurer);<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>6<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>7<span | 
 | style='mso-tab-count:1'>     </span>}<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>8<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>9<span | 
 | style='mso-tab-count:1'>     </span>protected void | 
 | makeActions(IWorkbenchWindow window) {<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>10<span | 
 | style='mso-tab-count:2'>           </span>intro | 
 | = ActionFactory.INTRO.create(window);<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>11<span | 
 | style='mso-tab-count:1'>    </span>}<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>12<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>13<span | 
 | style='mso-tab-count:1'>    </span>protected void fillMenuBar(IMenuManager | 
 | menuBar) {<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>14<span | 
 | style='mso-tab-count:2'>           </span>menuBar.add(createHelpMenu());<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>15<span | 
 | style='mso-tab-count:1'>    </span>}<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>16<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>17<span | 
 | style='mso-tab-count:1'>    </span>protected void | 
 | fillCoolBar(ICoolBarManager coolBar) {<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>18<span | 
 | style='mso-tab-count:3'>                  </span>IToolBarManager | 
 | toolBar = new ToolBarManager(coolBar.getStyle());<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>19<span | 
 | style='mso-tab-count:3'>                  </span>toolBar.add(new | 
 | Separator());<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>20<span | 
 | style='mso-tab-count:3'>                  </span>toolBar.add(intro);<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>21<span | 
 | style='mso-tab-count:3'>                  </span>coolBar.add(new | 
 | ToolBarContributionItem(toolBar,<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>22<span | 
 | style='mso-tab-count:5'>                                </span>"com.sample.application.SimpleToolBar"));<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>23<span | 
 | style='mso-tab-count:1'>    </span>}<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>24<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>25<span | 
 | style='mso-tab-count:1'>    </span>private MenuManager | 
 | createHelpMenu() {<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>26<span | 
 | style='mso-tab-count:2'>           </span>MenuManager | 
 | menu = new MenuManager(<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>27<span | 
 | style='mso-tab-count:4'>                         </span>"&Help", | 
 | IWorkbenchActionConstants.M_HELP);<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>28<span | 
 | style='mso-tab-count:2'>           </span>// | 
 | Welcome or intro page would go here<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>29<span | 
 | style='mso-tab-count:2'>           </span>menu.add(intro);<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>30<span | 
 | style='mso-tab-count:2'>           </span>menu.add(new | 
 | GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>31<span | 
 | style='mso-tab-count:2'>           </span>return | 
 | menu;<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>32<span | 
 | style='mso-tab-count:1'>    </span>}<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US>33 }<o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><i style='mso-bidi-font-style:normal'><span lang=EN-US><o:p> </o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US>SampleActionBarAdvisor is a subclass of org.eclipse.ui.application.ActionBarAdvisor, | 
 | it is used to define the menu and cool bar in our production. </span></p> | 
 |  | 
 | <p class=MsoNormal style='margin-left:21.0pt;text-indent:-21.0pt;mso-list:l1 level1 lfo1; | 
 | tab-stops:list 21.0pt'><![if !supportLists]><span lang=EN-US style='font-family: | 
 | Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings'><span | 
 | style='mso-list:Ignore'>Ø<span style='font:7.0pt "Times New Roman"'>         | 
 | </span></span></span><![endif]><span lang=EN-US>Line10 defines the action to | 
 | call welcome page</span></p> | 
 |  | 
 | <p class=MsoNormal style='margin-left:21.0pt;text-indent:-21.0pt;mso-list:l1 level1 lfo1; | 
 | tab-stops:list 21.0pt'><![if !supportLists]><span lang=EN-US style='font-family: | 
 | Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings'><span | 
 | style='mso-list:Ignore'>Ø<span style='font:7.0pt "Times New Roman"'>         | 
 | </span></span></span><![endif]><span lang=EN-US>Line17-23 adds the action to | 
 | cool bar</span></p> | 
 |  | 
 | <p class=MsoNormal style='margin-left:21.0pt;text-indent:-21.0pt;mso-list:l1 level1 lfo1; | 
 | tab-stops:list 21.0pt'><![if !supportLists]><span lang=EN-US style='font-family: | 
 | Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings'><span | 
 | style='mso-list:Ignore'>Ø<span style='font:7.0pt "Times New Roman"'>         | 
 | </span></span></span><![endif]><span lang=EN-US>Line25-31 creates a help menu | 
 | and adds the action as its menu item.</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US style='mso-bidi-font-size:10.5pt; | 
 | color:green'>Hint: org.eclipse.ui.actions.ActionFactory provides the access to | 
 | standard actions provided by the workbench, such as copy, paste, about, | 
 | welcome, etc.<o:p></o:p></span></p> | 
 |  | 
 | <h3><span lang=EN-US style='font-size:15.0pt;line-height:173%'>Testing the | 
 | result<o:p></o:p></span></h3> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US>The welcome page:<o:p></o:p></span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><!--[if gte vml 1]><v:shape id="_x0000_i1039" | 
 |  type="#_x0000_t75" style='width:390.75pt;height:268.5pt'> | 
 |  <v:imagedata src="images/image029.png" | 
 |   o:title=""/> | 
 | </v:shape><![endif]--><![if !vml]><img border=0 width=521 height=358 | 
 | src="images/image030.jpg" | 
 | v:shapes="_x0000_i1039"><![endif]></span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US>Icon when “Run Action Sample” is hovered:</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><!--[if gte vml 1]><v:shape id="_x0000_i1040" | 
 |  type="#_x0000_t75" style='width:3in;height:65.25pt'> | 
 |  <v:imagedata src="images/image031.png" | 
 |   o:title=""/> | 
 | </v:shape><![endif]--><![if !vml]><img border=0 width=288 height=87 | 
 | src="images/image032.jpg" | 
 | v:shapes="_x0000_i1040"><![endif]></span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US>When click “Run Action Sample”, the sample | 
 | view will be shown and the welcome page will switch to standby style. </span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><!--[if gte vml 1]><v:shape id="_x0000_i1041" | 
 |  type="#_x0000_t75" style='width:3in;height:147pt'> | 
 |  <v:imagedata src="images/image033.png" | 
 |   o:title=""/> | 
 | </v:shape><![endif]--><![if !vml]><img border=0 width=288 height=196 | 
 | src="images/image034.jpg" | 
 | v:shapes="_x0000_i1041"><![endif]></span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US>When click “Show Internal Link”, following | 
 | screen shown:</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><!--[if gte vml 1]><v:shape id="_x0000_i1042" | 
 |  type="#_x0000_t75" style='width:414.75pt;height:285pt'> | 
 |  <v:imagedata src="images/image035.png" | 
 |   o:title=""/> | 
 | </v:shape><![endif]--><![if !vml]><img border=0 width=553 height=380 | 
 | src="images/image036.jpg" | 
 | v:shapes="_x0000_i1042"><![endif]></span></p> | 
 |  | 
 | <h2><span lang=EN-US>Summary</span></h2> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US>Now you have created the first welcome page | 
 | for your product. Eclipse provides an easy way for users to get familiar with | 
 | your product when they run your product.</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p> | 
 |  | 
 | <h2><span lang=EN-US>Resource</span></h2> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US>The completed sample is available. | 
 | Following are the useful links related with eclipse intro part:</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US>. <a | 
 | href="http://help.eclipse.org/help31/topic/org.eclipse.platform.doc.isv/guide/workbench_advext_intro.htm">http://help.eclipse.org/help31/topic/org.eclipse.platform.doc.isv/guide/workbench_advext_intro.htm</a></span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p> | 
 |  | 
 | <span lang=EN-US style='font-size:10.5pt;mso-bidi-font-size:12.0pt;font-family: | 
 | "Times New Roman";mso-fareast-font-family:宋体;mso-font-kerning:1.0pt;mso-ansi-language: | 
 | EN-US;mso-fareast-language:ZH-CN;mso-bidi-language:AR-SA'><br clear=all | 
 | style='page-break-before:always'> | 
 | </span> | 
 |  | 
 | <p class=MsoNormal><span class=Heading3Char><span lang=EN-US style='font-size: | 
 | 16.0pt;font-family:"Times New Roman"'>Appendix 1: source code for com.sample.application</span></span><i | 
 | style='mso-bidi-font-style:normal'><span lang=EN-US><o:p></o:p></span></i></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US>package com.sample.application.view;</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US>import org.eclipse.jface.action.Action;</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US>import org.eclipse.ui.IViewReference;</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US>import org.eclipse.ui.IWorkbenchPage;</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US>import org.eclipse.ui.PlatformUI;</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US>public class ShowViewAction extends Action | 
 | {</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US>public ShowViewAction() {</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:2'>              </span>super();</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:1'>       </span>}</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:1'>       </span>public | 
 | void run() {</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:2'>              </span>IWorkbenchPage | 
 | workbenchPage = PlatformUI.getWorkbench()</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:4'>                            </span>.getActiveWorkbenchWindow().getActivePage();</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:2'>              </span>IViewReference[] | 
 | ivf = workbenchPage.getViewReferences();</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:2'>              </span>try | 
 | {</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:3'>                     </span>int | 
 | i = ivf.length;</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:3'>                     </span>for | 
 | (; i-- > 0;) {</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:4'>                            </span>if | 
 | (ivf[i].getId().equals(</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:6'>                                          </span>"com.sample.application.view.DefaultView")) | 
 | {</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:5'>                                   </span>workbenchPage.activate(ivf[i].getView(true));</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:5'>                                   </span>break;</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:4'>                            </span>}</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:3'>                     </span>}</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:2'>              </span>} | 
 | catch (Exception e1) {</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:3'>                     </span>e1.printStackTrace();</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:2'>              </span>}</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:1'>       </span>}</span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US>}<o:p></o:p></span></p> | 
 |  | 
 | <p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p> | 
 |  | 
 | </div> | 
 |  | 
 | </body> | 
 |  | 
 | </html> |