|
Link Here
|
| 2 |
<!-- Schema file written by PDE --> |
2 |
<!-- Schema file written by PDE --> |
| 3 |
<schema targetNamespace="org.eclipse.ui" xmlns="http://www.w3.org/2001/XMLSchema"> |
3 |
<schema targetNamespace="org.eclipse.ui" xmlns="http://www.w3.org/2001/XMLSchema"> |
| 4 |
<annotation> |
4 |
<annotation> |
| 5 |
<appinfo> |
5 |
<appInfo> |
| 6 |
<meta.schema plugin="org.eclipse.ui" id="popupMenus" name="Pop-up Menus"/> |
6 |
<meta.schema plugin="org.eclipse.ui" id="popupMenus" name="Pop-up Menus"/> |
| 7 |
</appinfo> |
7 |
</appInfo> |
| 8 |
<documentation> |
8 |
<documentation> |
| 9 |
This extension point is used to add new actions to context menus owned by other plug-ins. Action contributions may be made against a specific object type (<samp>objectContribution</samp>) or against a specific context menu of a view or editor part (<samp>viewerContribution</samp>). When using <samp>objectContribution</samp>, the contribution will appear in all view or editor part context menus where objects of the specified type are selected. In contrast, using <samp>viewerContribution</samp>, the contribution will only appear in the specified view or editor part context menu, regardless of the selection. |
9 |
This extension point is used to add new actions to context menus owned by other plug-ins. Action contributions may be made against a specific object type (<samp>objectContribution</samp>) or against a specific context menu of a view or editor part (<samp>viewerContribution</samp>). When using <samp>objectContribution</samp>, the contribution will appear in all view or editor part context menus where objects of the specified type are selected. In contrast, using <samp>viewerContribution</samp>, the contribution will only appear in the specified view or editor part context menu, regardless of the selection. |
| 10 |
<p> |
10 |
<p> |
|
Link Here
|
| 18 |
Individual actions in an object contribution can use the attribute <code>enablesFor</code> to specify if it should only apply for a single, multiple, or any other selection type. |
18 |
Individual actions in an object contribution can use the attribute <code>enablesFor</code> to specify if it should only apply for a single, multiple, or any other selection type. |
| 19 |
<p> |
19 |
<p> |
| 20 |
If these filtering mechanisms are inadequate an action contribution may use the <samp>filter</samp> mechanism. In this case the attributes of the target object are described in a series of name-value pairs. The attributes which apply to the selection are type-specific and beyond the domain of the workbench itself, so the workbench will delegate filtering at this level to the actual selection. |
20 |
If these filtering mechanisms are inadequate an action contribution may use the <samp>filter</samp> mechanism. In this case the attributes of the target object are described in a series of name-value pairs. The attributes which apply to the selection are type-specific and beyond the domain of the workbench itself, so the workbench will delegate filtering at this level to the actual selection. |
|
|
21 |
<p> |
| 22 |
The </code>objectContribution</code> element uses the core expression <code>enablement</code>, as defined in <a href="org_eclipse_core_expressions_definitions.html">org.eclipse.core.expressions.definitions</a>. |
| 21 |
</documentation> |
23 |
</documentation> |
| 22 |
</annotation> |
24 |
</annotation> |
| 23 |
|
25 |
|
|
Link Here
|
| 28 |
<include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/> |
30 |
<include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/> |
| 29 |
|
31 |
|
| 30 |
<element name="extension"> |
32 |
<element name="extension"> |
|
|
33 |
<annotation> |
| 34 |
<appInfo> |
| 35 |
<meta.element /> |
| 36 |
</appInfo> |
| 37 |
</annotation> |
| 31 |
<complexType> |
38 |
<complexType> |
| 32 |
<sequence> |
39 |
<sequence> |
| 33 |
<element ref="objectContribution" minOccurs="0" maxOccurs="unbounded"/> |
40 |
<element ref="objectContribution" minOccurs="0" maxOccurs="unbounded"/> |
|
Link Here
|
| 45 |
<documentation> |
52 |
<documentation> |
| 46 |
an optional identifier of the extension instance |
53 |
an optional identifier of the extension instance |
| 47 |
</documentation> |
54 |
</documentation> |
| 48 |
<appinfo> |
55 |
<appInfo> |
| 49 |
<meta.attribute translatable="true"/> |
56 |
<meta.attribute translatable="true"/> |
| 50 |
</appinfo> |
57 |
</appInfo> |
| 51 |
</annotation> |
58 |
</annotation> |
| 52 |
</attribute> |
59 |
</attribute> |
| 53 |
<attribute name="name" type="string"> |
60 |
<attribute name="name" type="string"> |
|
Link Here
|
| 63 |
<element name="objectContribution"> |
70 |
<element name="objectContribution"> |
| 64 |
<annotation> |
71 |
<annotation> |
| 65 |
<documentation> |
72 |
<documentation> |
| 66 |
This element is used to define a group of actions and/or menus for any viewer context menus for which the objects of the specified type are selected. |
73 |
This element is used to define a group of actions and/or menus for any viewer context menus for which the objects of the specified type are selected. <code>enablement</code> in this element refers to core expression enablement, as defined in <a href="org_eclipse_core_expressions_definitions.html">org.eclipse.core.expressions.definitions</a>, and effects the enablement of the objectContribution not the contained actions. |
| 67 |
</documentation> |
74 |
</documentation> |
| 68 |
</annotation> |
75 |
</annotation> |
| 69 |
<complexType> |
76 |
<complexType> |
|
Link Here
|
| 87 |
a fully qualified name of the class or interface that all objects in the |
94 |
a fully qualified name of the class or interface that all objects in the |
| 88 |
selection must subclass or implement. |
95 |
selection must subclass or implement. |
| 89 |
</documentation> |
96 |
</documentation> |
| 90 |
<appinfo> |
97 |
<appInfo> |
| 91 |
<meta.attribute kind="java" basedOn="java.lang.object"/> |
98 |
<meta.attribute kind="java" basedOn="java.lang.object"/> |
| 92 |
</appinfo> |
99 |
</appInfo> |
| 93 |
</annotation> |
100 |
</annotation> |
| 94 |
</attribute> |
101 |
</attribute> |
| 95 |
<attribute name="nameFilter" type="string"> |
102 |
<attribute name="nameFilter" type="string"> |
|
Link Here
|
| 140 |
|
147 |
|
| 141 |
<element name="action"> |
148 |
<element name="action"> |
| 142 |
<annotation> |
149 |
<annotation> |
| 143 |
<appinfo> |
150 |
<appInfo> |
| 144 |
<meta.element labelAttribute="label" icon="icon"/> |
151 |
<meta.element labelAttribute="label" icon="icon"/> |
| 145 |
</appinfo> |
152 |
</appInfo> |
| 146 |
<documentation> |
153 |
<documentation> |
| 147 |
This element defines an action that the user can invoke in the UI. |
154 |
This element defines an action that the user can invoke in the UI. |
| 148 |
</documentation> |
155 |
</documentation> |
|
Link Here
|
| 165 |
<documentation> |
172 |
<documentation> |
| 166 |
a translatable name used as the menu item text. The name can include mnenomic information. |
173 |
a translatable name used as the menu item text. The name can include mnenomic information. |
| 167 |
</documentation> |
174 |
</documentation> |
| 168 |
<appinfo> |
175 |
<appInfo> |
| 169 |
<meta.attribute translatable="true"/> |
176 |
<meta.attribute translatable="true"/> |
| 170 |
</appinfo> |
177 |
</appInfo> |
| 171 |
</annotation> |
178 |
</annotation> |
| 172 |
</attribute> |
179 |
</attribute> |
| 173 |
<attribute name="definitionId" type="string"> |
180 |
<attribute name="definitionId" type="string"> |
|
Link Here
|
| 175 |
<documentation> |
182 |
<documentation> |
| 176 |
This specifies the command that this action is handling. This is used to decide which key binding to display in the pop-up menu. |
183 |
This specifies the command that this action is handling. This is used to decide which key binding to display in the pop-up menu. |
| 177 |
</documentation> |
184 |
</documentation> |
| 178 |
<appinfo> |
185 |
<appInfo> |
| 179 |
<meta.attribute kind="identifier" basedOn="org.eclipse.ui.commands/command/@id"/> |
186 |
<meta.attribute kind="identifier" basedOn="org.eclipse.ui.commands/command/@id"/> |
| 180 |
</appinfo> |
187 |
</appInfo> |
| 181 |
</annotation> |
188 |
</annotation> |
| 182 |
</attribute> |
189 |
</attribute> |
| 183 |
<attribute name="menubarPath" type="string"> |
190 |
<attribute name="menubarPath" type="string"> |
|
Link Here
|
| 193 |
a relative path of an icon used to visually represent the action in its context. |
200 |
a relative path of an icon used to visually represent the action in its context. |
| 194 |
The path is relative to the location of the plugin.xml file of the contributing plug-in. |
201 |
The path is relative to the location of the plugin.xml file of the contributing plug-in. |
| 195 |
</documentation> |
202 |
</documentation> |
| 196 |
<appinfo> |
203 |
<appInfo> |
| 197 |
<meta.attribute kind="resource"/> |
204 |
<meta.attribute kind="resource"/> |
| 198 |
</appinfo> |
205 |
</appInfo> |
| 199 |
</annotation> |
206 |
</annotation> |
| 200 |
</attribute> |
207 |
</attribute> |
| 201 |
<attribute name="helpContextId" type="string"> |
208 |
<attribute name="helpContextId" type="string"> |
|
Link Here
|
| 258 |
<documentation> |
265 |
<documentation> |
| 259 |
a name of the fully qualified class that implements <samp>org.eclipse.ui.IObjectActionDelegate</samp> (for object contributions), <samp>org.eclipse.ui.IViewActionDelegate</samp> (for viewer contributions to a view part), or <samp>org.eclipse.ui.IEditorActionDelegate</samp> (for viewer contributions to an editor part). For backwards compatibility, <samp>org.eclipse.ui.IActionDelegate</samp> may be implemented for object contributions. |
266 |
a name of the fully qualified class that implements <samp>org.eclipse.ui.IObjectActionDelegate</samp> (for object contributions), <samp>org.eclipse.ui.IViewActionDelegate</samp> (for viewer contributions to a view part), or <samp>org.eclipse.ui.IEditorActionDelegate</samp> (for viewer contributions to an editor part). For backwards compatibility, <samp>org.eclipse.ui.IActionDelegate</samp> may be implemented for object contributions. |
| 260 |
</documentation> |
267 |
</documentation> |
| 261 |
<appinfo> |
268 |
<appInfo> |
| 262 |
<meta.attribute kind="java"/> |
269 |
<meta.attribute kind="java"/> |
| 263 |
</appinfo> |
270 |
</appInfo> |
| 264 |
</annotation> |
271 |
</annotation> |
| 265 |
</attribute> |
272 |
</attribute> |
| 266 |
<attribute name="enablesFor" type="string"> |
273 |
<attribute name="enablesFor" type="string"> |
|
Link Here
|
| 318 |
<documentation> |
325 |
<documentation> |
| 319 |
an optional attribute that specifies the identifier of an action which this action overrides. The action represented by this identifier will not be contributed to the context menu. The action identifier must be from a prerequisite plug-in only. This attribute is only applicable to action elements of an object contribution. |
326 |
an optional attribute that specifies the identifier of an action which this action overrides. The action represented by this identifier will not be contributed to the context menu. The action identifier must be from a prerequisite plug-in only. This attribute is only applicable to action elements of an object contribution. |
| 320 |
</documentation> |
327 |
</documentation> |
| 321 |
<appinfo> |
328 |
<appInfo> |
| 322 |
<meta.attribute kind="identifier" basedOn="org.eclipse.ui.popupMenus/objectContribution/action/@id"/> |
329 |
<meta.attribute kind="identifier" basedOn="org.eclipse.ui.popupMenus/objectContribution/action/@id"/> |
| 323 |
</appinfo> |
330 |
</appInfo> |
| 324 |
</annotation> |
331 |
</annotation> |
| 325 |
</attribute> |
332 |
</attribute> |
| 326 |
<attribute name="tooltip" type="string"> |
333 |
<attribute name="tooltip" type="string"> |
|
Link Here
|
| 328 |
<documentation> |
335 |
<documentation> |
| 329 |
a translatable text representing the action's tool tip. Only used if the action appears in the toolbar. |
336 |
a translatable text representing the action's tool tip. Only used if the action appears in the toolbar. |
| 330 |
</documentation> |
337 |
</documentation> |
| 331 |
<appinfo> |
338 |
<appInfo> |
| 332 |
<meta.attribute translatable="true"/> |
339 |
<meta.attribute translatable="true"/> |
| 333 |
</appinfo> |
340 |
</appInfo> |
| 334 |
</annotation> |
341 |
</annotation> |
| 335 |
</attribute> |
342 |
</attribute> |
| 336 |
</complexType> |
343 |
</complexType> |
|
Link Here
|
| 338 |
|
345 |
|
| 339 |
<element name="filter"> |
346 |
<element name="filter"> |
| 340 |
<annotation> |
347 |
<annotation> |
| 341 |
<appinfo> |
348 |
<appInfo> |
| 342 |
<meta.element labelAttribute="name"/> |
349 |
<meta.element labelAttribute="name"/> |
| 343 |
</appinfo> |
350 |
</appInfo> |
| 344 |
<documentation> |
351 |
<documentation> |
| 345 |
This element is used to evaluate the attribute state of each object in the current selection. A match only if each object in the selection has the specified attribute state. Each object in the selection must implement, or adapt to, <samp>org.eclipse.ui.IActionFilter</samp>. |
352 |
This element is used to evaluate the attribute state of each object in the current selection. A match only if each object in the selection has the specified attribute state. Each object in the selection must implement, or adapt to, <samp>org.eclipse.ui.IActionFilter</samp>. |
| 346 |
</documentation> |
353 |
</documentation> |
|
Link Here
|
| 402 |
<documentation> |
409 |
<documentation> |
| 403 |
A class that implements one of the interfaces listed for the class attribute. It may also implement <code>org.eclipse.core.runtime.IExecutableExtension</code>. |
410 |
A class that implements one of the interfaces listed for the class attribute. It may also implement <code>org.eclipse.core.runtime.IExecutableExtension</code>. |
| 404 |
</documentation> |
411 |
</documentation> |
| 405 |
<appinfo> |
412 |
<appInfo> |
| 406 |
<meta.attribute kind="java"/> |
413 |
<meta.attribute kind="java"/> |
| 407 |
</appinfo> |
414 |
</appInfo> |
| 408 |
</annotation> |
415 |
</annotation> |
| 409 |
</attribute> |
416 |
</attribute> |
| 410 |
</complexType> |
417 |
</complexType> |
| 411 |
</element> |
418 |
</element> |
| 412 |
|
419 |
|
| 413 |
<annotation> |
420 |
<annotation> |
| 414 |
<appinfo> |
421 |
<appInfo> |
| 415 |
<meta.section type="examples"/> |
422 |
<meta.section type="examples"/> |
| 416 |
</appinfo> |
423 |
</appInfo> |
| 417 |
<documentation> |
424 |
<documentation> |
| 418 |
The following is an example of a pop-up menu extension point: |
425 |
The following is an example of a pop-up menu extension point: |
| 419 |
<p> |
426 |
<p> |
|
Link Here
|
| 511 |
</annotation> |
518 |
</annotation> |
| 512 |
|
519 |
|
| 513 |
<annotation> |
520 |
<annotation> |
| 514 |
<appinfo> |
521 |
<appInfo> |
| 515 |
<meta.section type="apiInfo"/> |
522 |
<meta.section type="apiInfo"/> |
| 516 |
</appinfo> |
523 |
</appInfo> |
| 517 |
<documentation> |
524 |
<documentation> |
| 518 |
The value of the action attribute <samp>class</samp> |
525 |
The value of the action attribute <samp>class</samp> |
| 519 |
must be a fully qualified class name of a Java class |
526 |
must be a fully qualified class name of a Java class |
|
Link Here
|
| 605 |
</annotation> |
612 |
</annotation> |
| 606 |
|
613 |
|
| 607 |
|
614 |
|
| 608 |
|
|
|
| 609 |
<annotation> |
615 |
<annotation> |
| 610 |
<appinfo> |
616 |
<appInfo> |
| 611 |
<meta.section type="implementation"/> |
617 |
<meta.section type="implementation"/> |
| 612 |
</appinfo> |
618 |
</appInfo> |
| 613 |
<documentation> |
619 |
<documentation> |
| 614 |
The workbench views have built-in context menus |
620 |
The workbench views have built-in context menus |
| 615 |
that already come loaded with a number of actions. |
621 |
that already come loaded with a number of actions. |
|
Link Here
|
| 622 |
</annotation> |
628 |
</annotation> |
| 623 |
|
629 |
|
| 624 |
<annotation> |
630 |
<annotation> |
| 625 |
<appinfo> |
631 |
<appInfo> |
| 626 |
<meta.section type="copyright"/> |
632 |
<meta.section type="copyright"/> |
| 627 |
</appinfo> |
633 |
</appInfo> |
| 628 |
<documentation> |
634 |
<documentation> |
| 629 |
Copyright (c) 2000, 2007 IBM Corporation and others.<br> |
635 |
Copyright (c) 2000, 2007 IBM Corporation and others.<br> |
| 630 |
All rights reserved. This program and the accompanying materials are made |
636 |
All rights reserved. This program and the accompanying materials are made |