author | fturovic <frank.turovich@nokia.com> |
Tue, 27 Jul 2010 15:28:19 -0500 | |
changeset 1704 | 24ac5a5cf80c |
parent 0 | fb279309251b |
permissions | -rw-r--r-- |
1704
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
2 |
|
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
3 |
<html> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
4 |
<head> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
6 |
<title>Adding items to the Carbide menu</title> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
7 |
<style> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
8 |
<!-- |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
9 |
span.attr |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
10 |
{color:green} |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
11 |
--> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
12 |
</style> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
13 |
<link rel="StyleSheet" href="../../book.css" type="text/css"/> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
14 |
</head> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
15 |
|
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
16 |
<body> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
17 |
<h2>Adding items to the Carbide menu</h2> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
18 |
|
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
19 |
<p>If you are creating a plug-in specifically for use with Carbide.c++ we recommend that |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
20 |
any menu items you create be added to existing Eclipse menus or to the <b>Carbide</b> menu. |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
21 |
</p> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
22 |
<p>Following this guideline reduces the likelihood of menu clutter for uses with multiple Carbide extensions. |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
23 |
It also provides users with a consistent place to look for extension commands. |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
24 |
</p> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
25 |
<p>The standard Eclipse technique for adding items to a menu is the <code>org.eclipse.ui.actionSet</code> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
26 |
extension point. To add to the Carbide menu you use a standard action set, and specify the Carbide menu |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
27 |
in the <code>menubarPath</code> attribute. Below is an example: |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
28 |
</p> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
29 |
|
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
30 |
<pre class="listing"> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
31 |
<extension |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
32 |
point=<span class="attr">"org.eclipse.ui.actionSets"</span>> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
33 |
<actionSet |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
34 |
id=<span class="attr">"Example.actionSet1"</span> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
35 |
label=<span class="attr">"Example Actions"</span> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
36 |
visible=<span class="attr">"true"</span>> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
37 |
<menu |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
38 |
id=<span class="attr">"com.nokia.carbide.cpp.ui.CarbideMenu"</span> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
39 |
label=<span class="attr">"&amp;Carbide"</span> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
40 |
path=<span class="attr">"additions"</span>> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
41 |
<groupMarker name=<span class="attr">"CarbideExtensions"</span>/> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
42 |
</menu> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
43 |
<action |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
44 |
class=<span class="attr">"SampleItem"</span> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
45 |
id=<span class="attr">"example.actions.CarbideExample"</span> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
46 |
label=<span class="attr">"My Extension"</span> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
47 |
icon=<span class="attr">"icons/sample.gif"</span> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
48 |
toolbarPath=<span class="attr">"sampleGroup"</span> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
49 |
menubarPath=<span class="attr">"com.nokia.carbide.cpp.ui.CarbideMenu/CarbideExtensions"</span> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
50 |
/> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
51 |
</actionSet> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
52 |
</extension> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
53 |
</pre> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
54 |
|
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
55 |
<p>The <menu> element must be included because Eclipse 3.2 does not completely support |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
56 |
declaring menus in one plugin and referencing them from another. Please include this element exactly as-is. |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
57 |
</p> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
58 |
|
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
59 |
<p>Note that the <code>menubarPath</code> has two elements to the path:</p> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
60 |
<ul> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
61 |
<li><code>com.nokia.carbide.cpp.ui.CarbideMenu</code> - this specifies the Carbide menu itself. |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
62 |
</li> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
63 |
<li><code>CarbideExtensions</code> - this specifies the particular group in the menu for |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
64 |
extension commands. It's important to include this specific group for compatibility with future Carbide.c++ releases. |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
65 |
</li> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
66 |
</ul> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
67 |
<p>Carbide defines two other named groups in this menu: <code>CarbideStart</code> and |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
68 |
<code>CarbideEnd</code>. These are for internal use and should not be used by third-party plugins. |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
69 |
</p> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
70 |
<div id="footer">Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. <br>License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a></div> |
24ac5a5cf80c
updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents:
0
diff
changeset
|
71 |
</div></body> |
0
fb279309251b
DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff
changeset
|
72 |
</html> |