blob: 951caf163d7ac92a2297dba3471df4100af4d36a [file] [log] [blame]
<!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 &quot;welcome pages&quot;
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 &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
2 &lt;?eclipse version=&quot;3.0&quot;?&gt;
3 &lt;plugin&gt;
4 &lt;extension id=&quot;SampleApplication&quot; name=&quot;SampleApplication&quot;
5 point=&quot;org.eclipse.core.runtime.applications&quot;&gt;
6 &lt;application&gt;
7 &lt;run class=&quot;com.sample.application.SampleApplication&quot;/&gt;
8 &lt;/application&gt;
9 &lt;/extension&gt;
10 &lt;extension id=&quot;product&quot; point=&quot;org.eclipse.core.runtime.products&quot;&gt;
11 &lt;product application=&quot;com.sample.application.SampleApplication&quot;
12 description=&quot;%productBlurb&quot; name=&quot;Sample Application&quot;
13 &lt;property name=&quot;windowImages&quot; value=&quot;winimage.gif &quot;/&gt;
14 &lt;property name=&quot;appName&quot; value=&quot;%appName&quot;/&gt;
15 &lt;/product&gt;
16 &lt;/extension&gt;
17 &lt;extension point=&quot;org.eclipse.ui.perspectives&quot;&gt;
18 &lt;perspective class=&quot;com.sample.application.SamplePerspective&quot; fixed=&quot;false&quot;
19 id=&quot;com.sample.application.SamplePerspective&quot; name=&quot;%sampleperspective&quot;/&gt;
20 &lt;/extension&gt;
21 &lt;extension point=&quot;org.eclipse.ui.views&quot;&gt;
22 &lt;view allowMultiple=&quot;false&quot; class=&quot;com.sample.application.view.DefaultView&quot;
23 icon=&quot;icons/navigator.gif&quot; id=&quot;com.sample.application.view.DefaultView&quot;
24 name=&quot;%sampleview&quot;/&gt;
25 &lt;/extension&gt;
26 &lt;/plugin&gt;</pre>
<p>Line 4-9: define an application with application id: com.sample.application.SampleApplication
(pluginID+&quot;.&quot;+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 &quot;welcomePage&quot; 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 &gt; New &gt; Project</b>, select <b>Plug-in Project</b> in
<b> Plug-in Development</b> and click <b>Next</b>.
Input the project name as &quot;<i>com.sample.application.intro</i>&quot;,
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 &quot;%pluginName&quot; and Plug-in Provider to
&quot;%providerName&quot;, 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 &quot;plugin.properties&quot;
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 &quot;Simple
Product Intro&quot; 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 &gt; Plug-in Manifest Editor.</b></p>
</blockquote>
<p><img border=0 width=553 height=343 src="images/image010.jpg"></p>
<p>Select the &quot;Extensions&quot; tab, add an extension to
the &quot;org.eclipse.ui.intro&quot; extension point, and set the value as follows:</p>
<p><img border=0 width=553 height=104 src="images/image012.jpg"></p>
<p>Select &quot;org.eclipse.ui.intro&quot;, right click, select <b>New &gt; 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 &gt; 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 &gt; 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 &quot;com.sample.application.introConfig(config)&quot;, right click, select <b>New &gt; 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 &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
2 &lt;introContent&gt;
3 &lt;page style=&quot;css/welcome/welcome.css&quot; alt-style=&quot;css/welcome/swt.properties&quot; id=&quot;overview&quot; &gt;
4 &lt;group id=&quot;page-topbar&quot; &gt;
5 &lt;img id=&quot;logo&quot; style-id=&quot;topbar2&quot;
6 src=&quot;./css/graphics/contentpage/banner_logo.jpg&quot;/&gt;
7 &lt;/group&gt;
8 &lt;group id=&quot;page-content&quot;&gt;
9 &lt;text style-id=&quot;page-title&quot; id=&quot;page-title&quot;&gt;WELCOME&lt;/text&gt;
10 &lt;text style-id=&quot;page-description&quot; id=&quot;page-description&quot;&gt;Welcome! This is the
11 first welcome page for my product.&lt;/text&gt;
12 &lt;group label=&quot;Sample Link Actions&quot; id=&quot;simple-links&quot; style-id=&quot;welcome-group&quot;&gt;
13
14 &lt;link label=&quot;Run Action Sample&quot;
15 url=&quot;http://org.eclipse.ui.intro/runAction?pluginId=com.sample.application&amp;amp;class=com.sample.application.view.ShowViewAction&quot; id=&quot;runAction&quot;
16 style-id=&quot;welcome-link&quot;&gt;
17 &lt;text&gt;This is a sample link to run action.&lt;/text&gt;
18 &lt;/link&gt;
19
20 &lt;link label=&quot;Show External Link Sample&quot;
21 url=&quot;http://org.eclipse.ui.intro/openBrowser?url=http://www.eclipse.org&quot;id=&quot;openBrowser&quot;
22 style-id=&quot;welcome-link&quot;&gt;
23 &lt;text&gt;This is a sample to open a link in an new opened web brower.&lt;/text&gt;
24 &lt;/link&gt;
25
26 &lt;link label=&quot;Show Internal Link Sample&quot;
27 url=&quot;http://org.eclipse.ui.intro/openURL?url=./intro/css/welcome/about.html&amp;amp;pluginId=com.sample.application.intro&quot;
28 id=&quot;openURL&quot;style-id=&quot;welcome-link&quot;&gt;
29 &lt;text&gt;This is a sample to goto another internal link.&lt;/text&gt;
30 &lt;/link&gt;
31
32 &lt;html label=&quot;Show Internal Link Sample&quot; src=&quot;./css/welcome/bottom.html&quot; br>
33 id=&quot;test&quot; style-id=&quot;welcome-anotherlink&quot;&gt;
34 &lt;text&gt;This is a sample to goto another internal link.&lt;/text&gt;
35 &lt;/html&gt;
36 &lt;/group&gt;
37 &lt;/group&gt;
38 &lt;/page&gt;
39 &lt;page style=&quot;css/standby_root.css&quot; alt-style=&quot;css/standby_swt.properties&quot; id=&quot;standby&quot; &gt;
40 &lt;title style-id=&quot;intro-header&quot;&gt;Standby Intro&lt;/title&gt;
41 &lt;group id=&quot;links-background&quot;&gt;
42 &lt;group id=&quot;page-links&quot;&gt;
43 &lt;link label=&quot;Run Action Sample&quot;
44 url=&quot;http://org.eclipse.ui.intro/runAction?pluginId=com.sample.application&amp;amp;class=com.sample.application.view.ShowViewAction&quot;
45 id=&quot;runAction&quot; style-id=&quot;welcome-link&quot;&gt;
46 &lt;text&gt;This is a sample link to run action.&lt;/text&gt;
47 &lt;/link&gt;
48
49 &lt;link label=&quot;Show External Link Sample&quot; url 50=&quot;http://org.eclipse.ui.intro/openBrowser?url=http://www.eclipse.org&quot;id=&quot;openBrowser&quot;
51 style-id=&quot;welcome-link&quot;&gt;
52 &lt;text&gt;This is a sample to open a link in an new opened web brower.&lt;/text&gt;
53 &lt;/link&gt;
54
55 &lt;link label=&quot;Show Internal Link Sample&quot; label=&quot;Show Internal Link
56 url=&quot;http://org.eclipse.ui.intro/openURL?url=./intro/css/welcome/about.html&amp;amp;pluginId=com.sample.application.intro&quot;
57 id=&quot;openURL&quot; style-id=&quot;welcome-link&quot;&gt;
58 &lt;text&gt;This is a sample to goto another internal link.&lt;/text&gt;
59 &lt;/link&gt;
60 &lt;/group&gt;
61 &lt;/group&gt;
62 &lt;/page&gt;
63 &lt;/introContent&gt;</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>&nbsp;</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'>&lt;pageId&gt;.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'>&nbsp;&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;pageId&gt;.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'>&nbsp;&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;pageId&gt;.&lt;path_to_group&gt;.layout.vspacing
= &lt;integer&gt;<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'>&nbsp; </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'>&nbsp;&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&quot;com.sample.application.SimpleToolBar&quot;));<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'>&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&quot;&amp;Help&quot;,
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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </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'>&nbsp;&nbsp;&nbsp; </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>&nbsp;</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'>&Oslash;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</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'>&Oslash;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</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'>&Oslash;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</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>&nbsp;</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>&nbsp;</o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>super();</span></p>
<p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}</span></p>
<p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>public
void run() {</span></p>
<p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>IWorkbenchPage
workbenchPage = PlatformUI.getWorkbench()</span></p>
<p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:4'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>.getActiveWorkbenchWindow().getActivePage();</span></p>
<p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>IViewReference[]
ivf = workbenchPage.getViewReferences();</span></p>
<p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>try
{</span></p>
<p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:3'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>int
i = ivf.length;</span></p>
<p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:3'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>for
(; i-- &gt; 0;) {</span></p>
<p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:4'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>if
(ivf[i].getId().equals(</span></p>
<p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:6'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&quot;com.sample.application.view.DefaultView&quot;))
{</span></p>
<p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:5'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>workbenchPage.activate(ivf[i].getView(true));</span></p>
<p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:5'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>break;</span></p>
<p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:4'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}</span></p>
<p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:3'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}</span></p>
<p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}
catch (Exception e1) {</span></p>
<p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:3'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>e1.printStackTrace();</span></p>
<p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}</span></p>
<p class=MsoNormal><span lang=EN-US><span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </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>&nbsp;</o:p></span></p>
</div>
</body>
</html>