5
|
1 |
<?xml version="1.0" encoding="UTF-8" ?>
|
|
2 |
<!--
|
|
3 |
Copyright (c) 2005, 2009 IBM Corporation and others.
|
|
4 |
All rights reserved. This program and the accompanying materials
|
|
5 |
are made available under the terms of the Eclipse Public License v1.0
|
|
6 |
which accompanies this distribution, and is available at
|
|
7 |
http://www.eclipse.org/legal/epl-v10.html
|
|
8 |
|
|
9 |
Contributors:
|
|
10 |
IBM Corporation - initial API and implementation
|
|
11 |
-->
|
|
12 |
|
|
13 |
<!-- Simple Cheat Sheet -->
|
|
14 |
|
|
15 |
<cheatsheet title="Create a plug-in">
|
|
16 |
|
|
17 |
<!-- Introduction -->
|
|
18 |
|
|
19 |
<intro href="/org.eclipse.platform.doc.user/reference/ref-cheatsheets.htm">
|
|
20 |
<description>
|
|
21 |
This cheat sheet will demonstrate how to create and run an
|
|
22 |
RCP application using PDE.
|
|
23 |
<br/>
|
|
24 |
<br/>
|
|
25 |
To learn more about using cheat sheets, click the help button
|
|
26 |
in the top right corner (?).
|
|
27 |
</description>
|
|
28 |
</intro>
|
|
29 |
|
|
30 |
<!-- Item -->
|
|
31 |
|
|
32 |
<item title="Open the plug-in development perspective"
|
|
33 |
href="/org.eclipse.pde.doc.user/guide/tools/views/views.htm"
|
|
34 |
dialog="false"
|
|
35 |
skip="false">
|
|
36 |
<description>
|
|
37 |
To open the plug-in development perspective,
|
|
38 |
select <b>Window->Open Perspective->Other...</b>
|
|
39 |
and choose <b>Plug-in Development</b>.
|
|
40 |
<br/>
|
|
41 |
<br/>
|
|
42 |
Alternatively, click the following button to perform the task.
|
|
43 |
</description>
|
|
44 |
<command serialization="org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.pde.ui.PDEPerspective)" required="false" translate="" />
|
|
45 |
</item>
|
|
46 |
|
|
47 |
<!-- Item -->
|
|
48 |
|
|
49 |
<item title="Create the plug-in"
|
|
50 |
href="/org.eclipse.pde.doc.user/guide/tools/project_wizards/new_plugin_project.htm"
|
|
51 |
dialog="true"
|
|
52 |
skip="false">
|
|
53 |
<description>
|
|
54 |
To create the plug-in, perform the following steps:
|
|
55 |
</description>
|
|
56 |
<subitem label="Select "File->New->Project..." from the main menu, expand the "Plug-in Development" category within the resulting "New Project" dialog box, and choose "Plug-in Project""
|
|
57 |
skip="false">
|
|
58 |
<command serialization="org.eclipse.ui.newWizard(newWizardId=org.eclipse.pde.ui.NewProjectWizard)" required="false" translate="" />
|
|
59 |
</subitem>
|
|
60 |
<subitem label="Input "com.example.rcpapp" into the "Project Name" text box on the "Plug-in Project" page and click "Next >""
|
|
61 |
skip="false"/>
|
|
62 |
<subitem label="Select the "Yes" radio button under the "Rich Client Application" heading on the "Plug-in Content" page and click "Next >""
|
|
63 |
skip="false"/>
|
|
64 |
<subitem label="Select the "Hello RCP" template from the list of "Available Templates" and click "Next""
|
|
65 |
skip="false"/>
|
|
66 |
<subitem
|
|
67 |
label="Select the "Add branding" check box and click "Finish"">
|
|
68 |
</subitem>
|
|
69 |
</item>
|
|
70 |
|
|
71 |
<!-- Item -->
|
|
72 |
|
|
73 |
<item title="Run the RCP Application"
|
|
74 |
dialog="false"
|
|
75 |
href="/org.eclipse.pde.doc.user/guide/tools/launchers/eclipse_application_launcher.htm"
|
|
76 |
skip="false">
|
|
77 |
<description>
|
|
78 |
To run the RCP application,
|
|
79 |
perform the following steps:
|
|
80 |
</description>
|
|
81 |
<subitem label="Select the "com.example.rcpapp" plug-in editor from the workbench and select the "Overview" tab within it"
|
|
82 |
skip="false">
|
|
83 |
<command serialization="org.eclipse.ui.navigate.openResource(filePath=/com.example.rcpapp/META-INF/MANIFEST.MF)" required="false" translate="" />
|
|
84 |
</subitem>
|
|
85 |
<subitem label="Click the "Launch an Eclipse application" hyperlink under the "Testing" heading"
|
|
86 |
skip="false"/>
|
|
87 |
<subitem label="Verify that you see an empty window with a window title of "Hello RCP""
|
|
88 |
skip="true"/>
|
|
89 |
<subitem label="Exit the RCP application"
|
|
90 |
skip="false"/>
|
|
91 |
</item>
|
|
92 |
|
|
93 |
<!-- Item -->
|
|
94 |
|
|
95 |
<item title="Modify the plug-in source"
|
|
96 |
dialog="true"
|
|
97 |
skip="false">
|
|
98 |
<description>
|
|
99 |
In this step, we want to suppress the <b>Hello RCP</b> text in
|
|
100 |
the window title bar of our RCP application.
|
|
101 |
<br/>
|
|
102 |
<br/>
|
|
103 |
To modify the plug-in source accordingly,
|
|
104 |
perform the following steps:
|
|
105 |
</description>
|
|
106 |
<subitem label="Open "ApplicationWorkbenchWindowAdvisor.java" by locating it in the "src" folder of the "com.example.rcpapp" package in the "Package Explorer" view and double-clicking it"
|
|
107 |
skip="false">
|
|
108 |
<command serialization="org.eclipse.ui.navigate.openResource(filePath=/com.example.rcpapp/src/com/example/rcpapp/ApplicationWorkbenchWindowAdvisor.java)" required="false" translate="" />
|
|
109 |
</subitem>
|
|
110 |
<subitem label="Comment out 'configurer.setTitle("Hello RCP");' in the "preWindowOpen()" method"
|
|
111 |
skip="false"/>
|
|
112 |
<subitem label="Select "File->Save" from the main menu"
|
|
113 |
skip="false"/>
|
|
114 |
</item>
|
|
115 |
|
|
116 |
<!-- Item -->
|
|
117 |
|
|
118 |
<item title="Test the RCP Application"
|
|
119 |
dialog="false"
|
|
120 |
href="/org.eclipse.pde.doc.user/guide/tools/launchers/eclipse_application_launcher.htm"
|
|
121 |
skip="false">
|
|
122 |
<description>
|
|
123 |
To test the RCP application,
|
|
124 |
perform the following steps:
|
|
125 |
</description>
|
|
126 |
<subitem label="Select the "com.example.rcpapp" plug-in editor from the workbench and select the "Overview" tab within it"
|
|
127 |
skip="false">
|
|
128 |
<command serialization="org.eclipse.ui.navigate.openResource(filePath=/com.example.rcpapp/META-INF/MANIFEST.MF)" required="false" translate="" />
|
|
129 |
</subitem>
|
|
130 |
<subitem label="Click the "Launch an Eclipse application" hyperlink under the "Testing" heading"
|
|
131 |
skip="false"/>
|
|
132 |
<subitem label="Verify that you see an empty window with no window title"
|
|
133 |
skip="true"/>
|
|
134 |
<subitem label="Exit the RCP application"
|
|
135 |
skip="false"/>
|
|
136 |
</item>
|
|
137 |
|
|
138 |
</cheatsheet>
|