Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 111778
Collapse All | Expand All

(-)schema/commonExpression.exsd (-26 / +2 lines)
Lines 1-12 Link Here
1
<?xml version='1.0' encoding='UTF-8'?>
1
<?xml version='1.0' encoding='UTF-8'?>
2
<!-- Schema file written by PDE -->
2
<!-- Schema file written by PDE -->
3
<schema targetNamespace="org.eclipse.ui">
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="commonExpression" name="Common Expressions"/>
6
         <meta.schema plugin="org.eclipse.ui" id="commonExpression" name="Common Expressions"/>
7
      </appInfo>
7
      </appInfo>
8
      <documentation>
8
      <documentation>
9
         An action&apos;s enablement and/or visibility can be defined using the elements &lt;samp&gt;enablement&lt;/samp&gt; and &lt;samp&gt;visibility&lt;/samp&gt; respectively. These two elements contain a boolean expression that is evaluated to determine the enablement and/or visibility.
9
         An action&apos;s enablement and/or visibility can be defined using the elements &lt;samp&gt;enablement&lt;/samp&gt; and &lt;samp&gt;visibility&lt;/samp&gt; respectively, if the extension point supports it. These two elements contain a boolean expression that is evaluated to determine the enablement and/or visibility.
10
&lt;p&gt;
10
&lt;p&gt;
11
The syntax is the same for the &lt;samp&gt;enablement&lt;/samp&gt; and &lt;samp&gt;visibility&lt;/samp&gt; elements. Both contain only one boolean expression sub-element. In the simplest case, this will be an &lt;samp&gt;objectClass&lt;/samp&gt;, &lt;samp&gt;objectState&lt;/samp&gt;, &lt;samp&gt;pluginState&lt;/samp&gt;, or &lt;samp&gt;systemProperty&lt;/samp&gt; element. In the more complex case, the &lt;samp&gt;and&lt;/samp&gt;, &lt;samp&gt;or&lt;/samp&gt;, and &lt;samp&gt;not&lt;/samp&gt; elements can be combined to form a boolean expression. Both the &lt;samp&gt;and&lt;/samp&gt;, and &lt;samp&gt;or&lt;/samp&gt; elements must contain 2 sub-elements. The &lt;samp&gt;not&lt;/samp&gt; element must contain only 1 sub-element.
11
The syntax is the same for the &lt;samp&gt;enablement&lt;/samp&gt; and &lt;samp&gt;visibility&lt;/samp&gt; elements. Both contain only one boolean expression sub-element. In the simplest case, this will be an &lt;samp&gt;objectClass&lt;/samp&gt;, &lt;samp&gt;objectState&lt;/samp&gt;, &lt;samp&gt;pluginState&lt;/samp&gt;, or &lt;samp&gt;systemProperty&lt;/samp&gt; element. In the more complex case, the &lt;samp&gt;and&lt;/samp&gt;, &lt;samp&gt;or&lt;/samp&gt;, and &lt;samp&gt;not&lt;/samp&gt; elements can be combined to form a boolean expression. Both the &lt;samp&gt;and&lt;/samp&gt;, and &lt;samp&gt;or&lt;/samp&gt; elements must contain 2 sub-elements. The &lt;samp&gt;not&lt;/samp&gt; element must contain only 1 sub-element.
12
&lt;/p&gt;
12
&lt;/p&gt;
Lines 231-262 Link Here
231
      </documentation>
231
      </documentation>
232
   </annotation>
232
   </annotation>
233
233
234
   <annotation>
235
      <appInfo>
236
         <meta.section type="examples"/>
237
      </appInfo>
238
      <documentation>
239
         
240
      </documentation>
241
   </annotation>
242
234
243
   <annotation>
244
      <appInfo>
245
         <meta.section type="apiInfo"/>
246
      </appInfo>
247
      <documentation>
248
         
249
      </documentation>
250
   </annotation>
251
235
252
   <annotation>
253
      <appInfo>
254
         <meta.section type="implementation"/>
255
      </appInfo>
256
      <documentation>
257
         
258
      </documentation>
259
   </annotation>
260
236
261
   <annotation>
237
   <annotation>
262
      <appInfo>
238
      <appInfo>
(-)schema/popupMenus.exsd (-34 / +40 lines)
Lines 2-10 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 (&lt;samp&gt;objectContribution&lt;/samp&gt;) or against a specific context menu of a view or editor part (&lt;samp&gt;viewerContribution&lt;/samp&gt;). When using &lt;samp&gt;objectContribution&lt;/samp&gt;, the contribution will appear in all view or editor part context menus where objects of the specified type are selected. In contrast, using &lt;samp&gt;viewerContribution&lt;/samp&gt;, 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 (&lt;samp&gt;objectContribution&lt;/samp&gt;) or against a specific context menu of a view or editor part (&lt;samp&gt;viewerContribution&lt;/samp&gt;). When using &lt;samp&gt;objectContribution&lt;/samp&gt;, the contribution will appear in all view or editor part context menus where objects of the specified type are selected. In contrast, using &lt;samp&gt;viewerContribution&lt;/samp&gt;, the contribution will only appear in the specified view or editor part context menu, regardless of the selection.
10
&lt;p&gt;
10
&lt;p&gt;
Lines 18-23 Link Here
18
Individual actions in an object contribution can use the attribute &lt;code&gt;enablesFor&lt;/code&gt; 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 &lt;code&gt;enablesFor&lt;/code&gt; to specify if it should only apply for a single, multiple, or any other selection type. 
19
&lt;p&gt;
19
&lt;p&gt;
20
If these filtering mechanisms are inadequate an action contribution may use the &lt;samp&gt;filter&lt;/samp&gt; 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 &lt;samp&gt;filter&lt;/samp&gt; 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
&lt;p&gt;
22
The &lt;/code&gt;objectContribution&lt;/code&gt; element uses the core expression &lt;code&gt;enablement&lt;/code&gt;, as defined in &lt;a href=&quot;org_eclipse_core_expressions_definitions.html&quot;&gt;org.eclipse.core.expressions.definitions&lt;/a&gt;.
21
      </documentation>
23
      </documentation>
22
   </annotation>
24
   </annotation>
23
25
Lines 28-33 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"/>
Lines 45-53 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">
Lines 63-69 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.  &lt;code&gt;enablement&lt;/code&gt; in this element refers to core expression enablement, as defined in &lt;a href=&quot;org_eclipse_core_expressions_definitions.html&quot;&gt;org.eclipse.core.expressions.definitions&lt;/a&gt;, and effects the enablement of the objectContribution not the contained actions.
67
         </documentation>
74
         </documentation>
68
      </annotation>
75
      </annotation>
69
      <complexType>
76
      <complexType>
Lines 87-95 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">
Lines 140-148 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>
Lines 165-173 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">
Lines 175-183 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">
Lines 193-201 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">
Lines 258-266 Link Here
258
               <documentation>
265
               <documentation>
259
                  a name of the fully qualified class that implements &lt;samp&gt;org.eclipse.ui.IObjectActionDelegate&lt;/samp&gt; (for object contributions), &lt;samp&gt;org.eclipse.ui.IViewActionDelegate&lt;/samp&gt; (for viewer contributions to a view part), or &lt;samp&gt;org.eclipse.ui.IEditorActionDelegate&lt;/samp&gt; (for viewer contributions to an editor part).  For backwards compatibility, &lt;samp&gt;org.eclipse.ui.IActionDelegate&lt;/samp&gt; may be implemented for object contributions.
266
                  a name of the fully qualified class that implements &lt;samp&gt;org.eclipse.ui.IObjectActionDelegate&lt;/samp&gt; (for object contributions), &lt;samp&gt;org.eclipse.ui.IViewActionDelegate&lt;/samp&gt; (for viewer contributions to a view part), or &lt;samp&gt;org.eclipse.ui.IEditorActionDelegate&lt;/samp&gt; (for viewer contributions to an editor part).  For backwards compatibility, &lt;samp&gt;org.eclipse.ui.IActionDelegate&lt;/samp&gt; 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">
Lines 318-326 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">
Lines 328-336 Link Here
328
               <documentation>
335
               <documentation>
329
                  a translatable text representing the action&apos;s tool tip. Only used if the action appears in the toolbar.
336
                  a translatable text representing the action&apos;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>
Lines 338-346 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, &lt;samp&gt;org.eclipse.ui.IActionFilter&lt;/samp&gt;.
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, &lt;samp&gt;org.eclipse.ui.IActionFilter&lt;/samp&gt;.
346
         </documentation>
353
         </documentation>
Lines 402-419 Link Here
402
               <documentation>
409
               <documentation>
403
                  A class that implements one of the interfaces listed for the class attribute.  It may also implement &lt;code&gt;org.eclipse.core.runtime.IExecutableExtension&lt;/code&gt;.
410
                  A class that implements one of the interfaces listed for the class attribute.  It may also implement &lt;code&gt;org.eclipse.core.runtime.IExecutableExtension&lt;/code&gt;.
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
&lt;p&gt;
426
&lt;p&gt;
Lines 511-519 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 &lt;samp&gt;class&lt;/samp&gt;
525
         The value of the action attribute &lt;samp&gt;class&lt;/samp&gt;
519
must be a fully qualified class name of a Java class 
526
must be a fully qualified class name of a Java class 
Lines 605-615 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. 
Lines 622-630 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.&lt;br&gt;
635
         Copyright (c) 2000, 2007 IBM Corporation and others.&lt;br&gt;
630
All rights reserved. This program and the accompanying materials are made
636
All rights reserved. This program and the accompanying materials are made

Return to bug 111778