aboutsummaryrefslogtreecommitdiffstats
blob: 96fe1f863d5fafe4eafecde9b74f9d4403d1913c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>

   <!-- A command with a default handler, effectively global but it can -->
   <!-- be overriden by part contributions -->
   <extension
         point="org.eclipse.ui.commands">
      <category
            name="%contributions.commands.category.name"
            description="%contributions.commands.category.desc"
            id="org.eclipse.ui.examples.contributions.commands.category">
      </category>
      <command
            categoryId="org.eclipse.ui.examples.contributions.commands.category"
            defaultHandler="org.eclipse.ui.examples.contributions.handlers.GlobalMenuHandler"
            id="org.eclipse.ui.examples.contributions.commands.globalCommand"
            name="%contributions.commands.globalCommand.name">
      </command>
   </extension>
   
   <!-- Binding CTRL+6 to the global command -->
   <extension
         point="org.eclipse.ui.bindings">
      <scheme
            id="org.eclipse.ui.examples.contributions.scheme"
            name="%scheme.info.name">
      </scheme>
      <key
            commandId="org.eclipse.ui.examples.contributions.commands.globalCommand"
            contextId="org.eclipse.ui.contexts.window"
            sequence="M1+6"
            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
      </key>
      <key
            commandId="org.eclipse.ui.file.exit"
            contextId="org.eclipse.ui.contexts.window"
            schemeId="org.eclipse.ui.examples.contributions.scheme"
            sequence="CTRL+Q">
      </key>
      <key
            commandId="org.eclipse.ui.window.newWindow"
            contextId="org.eclipse.ui.contexts.window"
            schemeId="org.eclipse.ui.examples.contributions.scheme"
            sequence="CTRL+N">
      </key>
      <key
            commandId="org.eclipse.ui.file.save"
            contextId="org.eclipse.ui.contexts.window"
            schemeId="org.eclipse.ui.examples.contributions.scheme"
            sequence="CTRL+S">
      </key>
      <key
            commandId="org.eclipse.ui.file.saveAll"
            contextId="org.eclipse.ui.contexts.window"
            schemeId="org.eclipse.ui.examples.contributions.scheme"
            sequence="CTRL+SHIFT+S">
      </key>
      <key
            commandId="org.eclipse.ui.file.close"
            contextId="org.eclipse.ui.contexts.window"
            schemeId="org.eclipse.ui.examples.contributions.scheme"
            sequence="CTRL+W">
      </key>
      <key
            commandId="org.eclipse.ui.file.closeAll"
            contextId="org.eclipse.ui.contexts.window"
            schemeId="org.eclipse.ui.examples.contributions.scheme"
            sequence="CTRL+SHIFT+W">
      </key>
      <key
            commandId="org.eclipse.ui.window.showViewMenu"
            contextId="org.eclipse.ui.contexts.window"
            schemeId="org.eclipse.ui.examples.contributions.scheme"
            sequence="CTRL+F10">
      </key>
      <key
            commandId="org.eclipse.ui.file.refresh"
            contextId="org.eclipse.ui.contexts.window"
            schemeId="org.eclipse.ui.examples.contributions.scheme"
            sequence="F5">
      </key>
   </extension>
   
   <!-- placing the global command in the main menu and main toolbar with a -->
   <!-- condition.  You can do it without a condition but that's extremely  -->
   <!-- uncommon. You can treat an actionSet like a context within the --> 
   <!-- condition. -->
   <extension
         point="org.eclipse.ui.actionSets">
      <actionSet
            id="org.eclipse.ui.examples.contributions.globalActionSet"
            label="%contributions.globalActionSet.label"
            visible="false">
      </actionSet>
   </extension>
   
   <!-- You can reuse expressions for conditions by defining them once -->
   <extension
         point="org.eclipse.core.expressions.definitions">
      <definition
            id="org.eclipse.ui.examples.contributions.inGlobalActionSet">
         <with
               variable="activeContexts">
            <iterate
                  operator="or">
               <equals
                     value="org.eclipse.ui.examples.contributions.globalActionSet">
               </equals>
            </iterate>
         </with>
      </definition>
      <definition
            id="org.eclipse.ui.examples.contributions.view.inView">
         <with
               variable="activePartId">
            <equals
                  value="org.eclipse.ui.examples.contributions.view">
            </equals>
         </with>
      </definition>
      <definition
            id="org.eclipse.ui.examples.contributions.view.activeEditor">
         <with
               variable="activeEditorId">
            <equals
                  value="org.eclipse.ui.examples.contributions.editor">
            </equals>
         </with>
      </definition>
   </extension>
   
   <!-- menus are defined hierarchically from a root, and separate from -->
   <!-- toolbars. -->
   <extension
         point="org.eclipse.ui.menus">
      <menuContribution
            locationURI="menu:org.eclipse.ui.main.menu?after=additions">
         <menu
               label="%contributions.menus.globalMenu.label"
               mnemonic="%contributions.menus.globalMenu.label"
               id="org.eclipse.ui.examples.contributions.menus.globalMenu">
            <command
                  commandId="org.eclipse.ui.examples.contributions.commands.globalCommand"
                  mnemonic="%contributions.menus.globalCommand.mnemonic"
                  id="org.eclipse.ui.examples.contributions.menus.globalCommand">
               <visibleWhen>
                  <reference
                        definitionId="org.eclipse.ui.examples.contributions.inGlobalActionSet">
                  </reference>
               </visibleWhen>
            </command>
            <separator
                  name="additions"
                  visible="false">
            </separator>
         </menu>
      </menuContribution>
      <menuContribution
            locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
         <toolbar
               id="org.eclipse.ui.examples.contributions.toolbars.sampleToolbar">
            <command
                  commandId="org.eclipse.ui.examples.contributions.commands.globalCommand"
                  icon="icons/sample.gif"
                  tooltip="%contributions.toolbars.globalCommand.tooltip"
                  id="org.eclipse.ui.examples.contributions.toolbars.globalCommand">
               <visibleWhen>
                  <reference
                        definitionId="org.eclipse.ui.examples.contributions.inGlobalActionSet">
                  </reference>
               </visibleWhen>
            </command>
            <separator
                  name="additions"
                  visible="false">
            </separator>
         </toolbar>
      </menuContribution>
   </extension>
   
   <!-- Create a view and some view commands -->
   <extension
         point="org.eclipse.ui.views">
      <category
            id="org.eclipse.ui.examples.contributions.viewCategory"
            name="%contributions.viewCategory.name">
      </category>
      <view
            category="org.eclipse.ui.examples.contributions.viewCategory"
            class="org.eclipse.ui.examples.contributions.view.InfoView"
            id="org.eclipse.ui.examples.contributions.view"
            name="%contributions.view.name">
      </view>
   </extension>
   <extension
         point="org.eclipse.ui.commands">
      <command
            categoryId="org.eclipse.ui.examples.contributions.commands.category"
            id="org.eclipse.ui.examples.contributions.view.count"
            description="%contributions.view.count.desc"
            name="%contributions.view.count.name">
      </command>
      <command
            categoryId="org.eclipse.ui.examples.contributions.commands.category"
            id="org.eclipse.ui.examples.contributions.view.swap"
            name="%contributions.view.swap.name">
      </command>
      <command
            categoryId="org.eclipse.ui.examples.contributions.commands.category"
            id="org.eclipse.ui.examples.contributions.view.edit"
            name="%contributions.view.edit.name">
      </command>
      <command
            id="org.eclipse.ui.examples.contributions.editor.infoAbout"
            categoryId="org.eclipse.ui.examples.contributions.commands.category"
            name="%contributions.editor.about.name">
      </command>
      <command
            categoryId="org.eclipse.ui.examples.contributions.commands.category"
            id="org.eclipse.ui.examples.contributions.view.adminRights"
            name="%command.adminRights.name">
      </command>
      <command
            categoryId="org.eclipse.ui.examples.contributions.commands.category"
            defaultHandler="org.eclipse.ui.examples.contributions.view.LoginHandler"
            id="org.eclipse.ui.examples.contributions.view.login"
            name="%command.login.name">
      </command>
   </extension>
   <extension
         point="org.eclipse.ui.menus">
      <menuContribution
            locationURI="menu:org.eclipse.ui.examples.contributions.view?after=additions">
         <command
               commandId="org.eclipse.ui.examples.contributions.view.count"
               mnemonic="%contributions.view.count.mnemonic">
         </command>
         <command
               commandId="org.eclipse.ui.examples.contributions.view.edit"
               mnemonic="%contributions.view.edit.mnemonic">
         </command>
         <command
               commandId="org.eclipse.ui.file.refresh"
               mnemonic="%contributions.view.refresh.mnemonic">
         </command>
      </menuContribution>
      <menuContribution
            locationURI="toolbar:org.eclipse.ui.examples.contributions.view?after=additions">
         <command
               commandId="org.eclipse.ui.newWizard"
               icon="icons/new_wiz.gif"
               style="push"
               tooltip="%command.new.tooltip">
            <parameter
                  name="newWizardId"
                  value="org.eclipse.ui.examples.contributions.wizard.newPerson">
            </parameter>
         </command>
         <command
               commandId="org.eclipse.ui.examples.contributions.view.swap"
               label="%contributions.view.swap.name"
               tooltip="%contributions.view.swap.tooltip">
         </command>
      </menuContribution>
      <menuContribution
            locationURI="popup:org.eclipse.ui.examples.contributions.view?after=additions">
         <command
               commandId="org.eclipse.ui.file.refresh"
               mnemonic="%contributions.view.refresh.mnemonic">
         </command>
         <command
               commandId="org.eclipse.ui.examples.contributions.view.login"
               mnemonic="%command.login.mnemonic"
               style="push">
         </command>
         <command
               commandId="org.eclipse.ui.examples.contributions.view.adminRights"
               mnemonic="%command.adminRights.mnemonic"
               style="toggle">
            <visibleWhen
                  checkEnabled="true">
            </visibleWhen>
         </command>
      </menuContribution>
      <menuContribution
            locationURI="popup:org.eclipse.ui.popup.any?after=additions">
         <command
               commandId="org.eclipse.ui.examples.contributions.view.edit"
               mnemonic="%contributions.view.edit.mnemonic">
            <visibleWhen>
               <with
                     variable="activeMenuSelection">
                  <iterate>
                     <adapt
                           type="org.eclipse.ui.examples.contributions.model.Person">
                     </adapt>
                  </iterate>
               </with>
            </visibleWhen>
         </command>
      </menuContribution>
      <menuContribution
            locationURI="menu:help?after=additions">
         <command
               commandId="org.eclipse.ui.examples.contributions.editor.infoAbout"
               style="push">
            <visibleWhen
                  checkEnabled="true">
            </visibleWhen>
         </command>
      </menuContribution>
   </extension>
   <extension
         point="org.eclipse.ui.handlers">
      <handler
            class="org.eclipse.ui.examples.contributions.view.RefreshInfoHandler"
            commandId="org.eclipse.ui.file.refresh">
         <activeWhen>
            <reference
                  definitionId="org.eclipse.ui.examples.contributions.view.inView">
            </reference>
         </activeWhen>
      </handler>
      <handler
            class="org.eclipse.ui.examples.contributions.view.SwapInfoHandler"
            commandId="org.eclipse.ui.examples.contributions.view.swap">
         <activeWhen>
            <reference
                  definitionId="org.eclipse.ui.examples.contributions.view.inView">
            </reference>
         </activeWhen>
         <enabledWhen>
            <with
                  variable="selection">
               <count
                     value="2">
               </count>
            </with>
         </enabledWhen>
      </handler>
      <handler
            class="org.eclipse.ui.examples.contributions.view.EditInfoHandler"
            commandId="org.eclipse.ui.examples.contributions.view.edit">
         <activeWhen>
            <reference
                  definitionId="org.eclipse.ui.examples.contributions.view.inView">
            </reference>
         </activeWhen>
         <enabledWhen>
            <with
                  variable="selection">
               <count
                     value="1">
               </count>
            </with>
         </enabledWhen>
      </handler>
      <handler
            class="org.eclipse.ui.examples.contributions.handlers.InfoAboutHandler"
            commandId="org.eclipse.ui.examples.contributions.editor.infoAbout">
         <enabledWhen>
            <with
                  variable="activePart">
               <instanceof
                     value="org.eclipse.ui.examples.contributions.view.InfoView">
               </instanceof>
            </with>
         </enabledWhen>
      </handler>
      <handler
            class="org.eclipse.ui.examples.contributions.view.AdminHandler"
            commandId="org.eclipse.ui.examples.contributions.view.adminRights">
         <enabledWhen>
            <and>
               <count
                     value="1">
               </count>
               <iterate>
                  <instanceof
                        value="org.eclipse.ui.examples.contributions.model.Person">
                  </instanceof>
               </iterate>
               <with
                     variable="org.eclipse.ui.examples.contributions.user">
                  <test
                        property="org.eclipse.ui.examples.contributions.user.isAdmin"
                        value="true">
                  </test>
               </with>
            </and>
         </enabledWhen>
      </handler>
   </extension>
   <extension
         point="org.eclipse.ui.contexts">
      <context
            id="org.eclipse.ui.examples.contributions.view.context"
            name="%contributions.view.context.name"
            parentId="org.eclipse.ui.contexts.window">
      </context>
   </extension>
   <extension
         point="org.eclipse.ui.bindings">
      <key
            commandId="org.eclipse.ui.examples.contributions.view.edit"
            contextId="org.eclipse.ui.examples.contributions.view.context"
            sequence="M1+O"
            schemeId="org.eclipse.ui.examples.contributions.scheme">
      </key>
      <key
            commandId="org.eclipse.ui.newWizard"
            contextId="org.eclipse.ui.contexts.window"
            schemeId="org.eclipse.ui.examples.contributions.scheme"
            sequence="CTRL+SHIFT+P">
            <parameter
                  id="newWizardId"
                  value="org.eclipse.ui.examples.contributions.wizard.newPerson">
            </parameter>
      </key>
   </extension>
   
   <!-- Add an editor for the Person model and some commands -->
   <extension
         point="org.eclipse.ui.editors">
      <editor
            class="org.eclipse.ui.examples.contributions.editor.InfoEditor"
            icon="icons/editor.gif"
            id="org.eclipse.ui.examples.contributions.editor"
            name="%contributions.editor.name">
      </editor>
   </extension>
   <extension
         point="org.eclipse.ui.commands">
      <command
            categoryId="org.eclipse.ui.examples.contributions.commands.category"
            id="org.eclipse.ui.examples.contributions.editor.reset"
            name="%contributions.editor.reset.name">
      </command>
      <command
            categoryId="org.eclipse.ui.examples.contributions.commands.category"
            id="org.eclipse.ui.examples.contributions.editor.delta"
            name="%contributions.editor.delta.name">
      </command>
      <command
            categoryId="org.eclipse.ui.examples.contributions.commands.category"
            defaultHandler="org.eclipse.ui.examples.contributions.editor.ActivateEditorHandler"
            id="org.eclipse.ui.examples.contributions.editor.activate"
            name="%command.activate.name">
         <commandParameter
               id="org.eclipse.ui.examples.contributions.editor.activate.index"
               name="%commandParameter.activate.index.name"
               optional="false"
               typeId="org.eclipse.ui.examples.contributions.IntegerType">
         </commandParameter>
      </command>
      <commandParameterType
            converter="org.eclipse.ui.examples.contributions.editor.IntegerTypeConverter"
            id="org.eclipse.ui.examples.contributions.IntegerType"
            type="java.lang.Integer">
      </commandParameterType>
   </extension>
   <extension
         point="org.eclipse.ui.menus">
      <menuContribution
            locationURI="menu:org.eclipse.ui.main.menu?after=additions">
         <menu
               id="org.eclipse.ui.examples.contributions.editor.menu"
               label="%contributions.editor.menu.label"
               mnemonic="%contributions.editor.menu.mnemonic">
            <command
                  commandId="org.eclipse.ui.examples.contributions.editor.reset"
                  mnemonic="%contributions.editor.reset.mnemonic">
               <visibleWhen>
                  <reference
                        definitionId="org.eclipse.ui.examples.contributions.view.activeEditor">
                  </reference>
               </visibleWhen>
            </command>
         </menu>
      </menuContribution>
      <menuContribution
            locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
         <toolbar
               id="org.eclipse.ui.examples.contributions.editor.toolbar">
            <command
                  commandId="org.eclipse.ui.examples.contributions.editor.delta"
                  icon="icons/change_obj.gif"
                  tooltip="%contributions.editor.delta.tooltip">
               <visibleWhen>
                  <reference
                        definitionId="org.eclipse.ui.examples.contributions.view.activeEditor">
                  </reference>
               </visibleWhen>
            </command>
         </toolbar>
      </menuContribution>
   </extension>
   <extension
         point="org.eclipse.ui.handlers">
      <handler
            class="org.eclipse.ui.examples.contributions.editor.DeltaInfoHandler"
            commandId="org.eclipse.ui.examples.contributions.editor.delta">
         <activeWhen>
            <reference
                  definitionId="org.eclipse.ui.examples.contributions.view.activeEditor">
            </reference>
         </activeWhen>
      </handler>
   </extension>
   
   <!-- adding a control and commands to the trim -->
   <extension
         point="org.eclipse.ui.menus">
      <menuContribution
            locationURI="toolbar:org.eclipse.ui.trim.status">
         <toolbar
               id="org.eclipse.ui.examples.contributions.verticalTrim">
            <command
                  commandId="org.eclipse.ui.examples.contributions.item2"
                  icon="icons/editor.gif"
                  id="contributions.trimItem"
                  label="%Trim.item"
                  tooltip="%TrimItem.toolTip">
            </command>
            <control
                  class="org.eclipse.ui.examples.contributions.ExampleControlContribution"
                  id="contributions.controlContrib1">
            </control>
            <command
                  commandId="org.eclipse.ui.examples.contributions.item2"
                  icon="icons/editor.gif"
                  id="contributions.trimItem2"
                  label="%Trim2.item"
                  tooltip="%TrimItem2.toolTip">
            </command>
         </toolbar>
      </menuContribution>
      <!-- this is an example of an object contribution -->
      <menuContribution
            locationURI="popup:org.eclipse.jdt.ui.PackageExplorer">
         <command
               commandId="org.eclipse.ui.help.aboutAction"
               label="%command.aboutXml.label"
               style="push">
            <visibleWhen
                  checkEnabled="false">
               <with
                     variable="activeMenuSelection">
                  <count
                        value="1">
                  </count>
                  <iterate>
                     <!-- I know it can't find this, just ignore it -->
                     <adapt
                           type="org.eclipse.core.resources.IFile">
                        <test
                              property="org.eclipse.core.resources.name"
                              value="*.xml">
                        </test>
                        <test
                              property="org.eclipse.core.resources.contentTypeId"
                              value="org.eclipse.ant.core.antBuildFile">
                        </test>
                     </adapt>
                  </iterate>
               </with>
            </visibleWhen>
         </command>
      </menuContribution>
   </extension>
   <extension
         point="org.eclipse.ui.commands">
      <command
            id="org.eclipse.ui.examples.contributions.item2"
            name="%CmdLabel">
      </command>
   </extension>
   <extension
         id="application"
         name="%application.name"
         point="org.eclipse.core.runtime.applications">
      <application
            cardinality="singleton-global"
            thread="main"
            visible="true">
         <run
               class="org.eclipse.ui.examples.contributions.rcp.ContributionApplication">
         </run>
      </application>
   </extension>
   <extension
         point="org.eclipse.ui.perspectives">
      <perspective
            class="org.eclipse.ui.examples.contributions.rcp.Perspective"
            fixed="true"
            icon="icons/perspective.gif"
            id="org.eclipse.ui.examples.contributions.perspective"
            name="%info.perspective.name">
      </perspective>
   </extension>
   <extension
         id="product"
         point="org.eclipse.core.runtime.products">
      <product
            application="org.eclipse.ui.examples.contributions.application"
            name="%info.product.name">
         <property
               name="windowImages"
               value="icons/sample2.gif">
         </property>
         <property
               name="aboutText"
               value="RCP Info product modified from the RCP Mail template">
         </property>
         <property
               name="aboutImage"
               value="product_lg.gif">
         </property>
         <property
               name="appName"
               value="%info.product.name">
         </property>
      </product>
   </extension>
   <extension
         point="org.eclipse.ui.menus">
      <menuContribution
            locationURI="menu:org.eclipse.ui.main.menu">
         <menu
               id="file"
               label="%menu.file.label"
               mnemonic="%menu.file.mnemonic">
            <command
                  commandId="org.eclipse.ui.file.refresh"
                  mnemonic="%command.refresh.mnemonic"
                  style="push">
            </command>
            <separator
                  name="sep1"
                  visible="true">
            </separator>
            <command
                  commandId="org.eclipse.ui.file.exit"
                  mnemonic="%command.exit.mnemonic"
                  style="push">
            </command>
         </menu>
         <separator
               name="additions"
               visible="false">
         </separator>
         <menu
               id="window"
               label="%menu.window.label"
               mnemonic="%menu.window.mnemonic">
            <command
                  commandId="org.eclipse.ui.window.newWindow"
                  mnemonic="%command.newWindow.mnemonic"
                  style="push">
            </command>
            <separator
                  name="sep1"
                  visible="true">
            </separator>
            <dynamic
                  class="org.eclipse.ui.examples.contributions.editor.DynamicEditorList"
                  id="org.eclipse.ui.tutorials.commands.dynamicEditorList">
            </dynamic>
         </menu>
         <menu
               id="help"
               label="%menu.help.label"
               mnemonic="%menu.help.mnemonic">
            <command
                  commandId="org.eclipse.ui.help.aboutAction"
                  mnemonic="%command.aboutAction.mnemonic"
                  style="push">
            </command>
         </menu>
      </menuContribution>
      <menuContribution
            locationURI="toolbar:org.eclipse.ui.main.toolbar">
         <toolbar
               id="org.eclipse.ui.examples.contributions.group.file">
            <command
                  commandId="org.eclipse.ui.file.save"
                  style="push">
            </command>
            <command
                  commandId="org.eclipse.ui.file.saveAll"
                  style="push">
            </command>
         </toolbar>
         <separator
               name="additions"
               visible="false">
         </separator>
      </menuContribution>
   </extension>
   <extension
         point="org.eclipse.ui.services">
      <serviceFactory
            factoryClass="org.eclipse.ui.examples.contributions.model.PersonServiceFactory">
         <service
               serviceClass="org.eclipse.ui.examples.contributions.model.IPersonService"/>
      </serviceFactory>
      <sourceProvider
            provider="org.eclipse.ui.examples.contributions.model.UserSourceProvider">
         <variable
               name="org.eclipse.ui.examples.contributions.user"
               priorityLevel="activeSite">
         </variable>
      </sourceProvider>
   </extension>
   <extension
         point="org.eclipse.ui.newWizards">
      <category
            id="org.eclipse.ui.examples.contributions.wizardCategory"
            name="%person.category.name">
      </category>
      <wizard
            category="org.eclipse.ui.examples.contributions.wizardCategory"
            class="org.eclipse.ui.examples.contributions.model.PersonWizard"
            id="org.eclipse.ui.examples.contributions.wizard.newPerson"
            name="%person.wizard.name">
      </wizard>
   </extension>
   <extension
         point="org.eclipse.core.expressions.propertyTesters">
      <propertyTester
            class="org.eclipse.ui.examples.contributions.model.UserPropertyTester"
            id="org.eclipse.ui.examples.contributions.user.propertyTester"
            namespace="org.eclipse.ui.examples.contributions.user"
            properties="isAdmin,id"
            type="org.eclipse.ui.examples.contributions.model.Person">
      </propertyTester>
   </extension>
</plugin>