Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 0c053790d42a649b570bd710a87bac2f16c522b0 (plain) (blame)
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse version="3.4"?>

<plugin>
<extension point="org.eclipse.papyrus.emf.facet.util.emf.core.modeldeclaration">
  <modeldeclaration file="resources/OpenedPage.custom"/>
</extension>
   <extension-point id="actionHandler" name="actionHandler" schema="schema/org.eclipse.papyrus.views.modelexplorer.actionHandler.exsd"/>
   <extension
         point="org.eclipse.papyrus.emf.facet.util.emf.core.modeldeclaration">
      <modeldeclaration
            file="resources/ReadOnlyElement.custom">
      </modeldeclaration>
   </extension>
   <extension point="org.eclipse.ui.views">
      <view category="org.eclipse.papyrus.views.category" class="org.eclipse.papyrus.views.modelexplorer.ModelExplorerPageBookView" icon="icons/ModelExplorer.gif" id="org.eclipse.papyrus.views.modelexplorer.modelexplorer" name="Model Explorer" restorable="true">
      </view>
   </extension>
   <extension point="org.eclipse.ui.navigator.viewer">
      <viewer popupMenuId="org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup" viewerId="org.eclipse.papyrus.views.modelexplorer.modelexplorer">
         <options>
            <property
                  name="org.eclipse.ui.navigator.hideCollapseAllAction"
                  value="true">
            </property>
         </options>
      </viewer>
      <viewerContentBinding viewerId="org.eclipse.papyrus.views.modelexplorer.modelexplorer">
         <includes>
            <contentExtension pattern="org.eclipse.papyrus.views.modelexplorer.*">
            </contentExtension>
         </includes>
      </viewerContentBinding>
      <!--We add a drag assistant in order support drag and drop between Model Explorer and Table Editor or other View/editors -->
      <dragAssistant class="org.eclipse.papyrus.views.modelexplorer.dnd.EObjectDragAdapterAssistant" viewerId="org.eclipse.papyrus.views.modelexplorer.modelexplorer">
      </dragAssistant>
      <viewerActionBinding
            viewerId="org.eclipse.papyrus.views.modelexplorer.modelexplorer">
         <includes>
            <actionExtension
                  pattern="org.eclipse.papyrus.views.modelexplorer.actionprovider.*">
            </actionExtension>
         </includes>
      </viewerActionBinding>
   </extension>
   <extension point="org.eclipse.ui.navigator.navigatorContent">
      <navigatorContent activeByDefault="false" contentProvider="org.eclipse.papyrus.infra.ui.emf.providers.MoDiscoContentProvider" id="org.eclipse.papyrus.views.modelexplorer.navigatorContent" labelProvider="org.eclipse.jface.viewers.LabelProvider" name="Model Contents" priority="lowest">
         <triggerPoints>
            <or>
               <instanceof value="org.eclipse.emf.ecore.EObject">
               </instanceof>
               <adapt type="org.eclipse.emf.ecore.EObject">
               </adapt>
               <instanceof value="java.lang.Object">
               </instanceof>
            </or>
         </triggerPoints>
         <possibleChildren>
            <or>
               <instanceof value="org.eclipse.gmf.runtime.notation.Diagram">
               </instanceof>
               <adapt type="org.eclipse.emf.ecore.EObject"/>
            </or>
         </possibleChildren>
         <actionProvider class="org.eclipse.papyrus.views.modelexplorer.actionprovider.GenericTransformActionProvider" id="org.eclipse.papyrus.views.modelexplorer.actionprovider.GenericTransformActionProvider">
            <enablement>
               <or>
                  <adapt type="org.eclipse.emf.ecore.EObject">
                  </adapt>
                  <instanceof
                        value="org.eclipse.emf.ecore.EObject">
                  </instanceof>
               </or>
            </enablement>
         </actionProvider>
          
         <actionProvider class="org.eclipse.papyrus.views.modelexplorer.actionprovider.EditingDomainActionProvider" id="org.eclipse.papyrus.views.modelexplorer.actionprovider.EditingDomainActionProvider">
                  <enablement>
               <and>
                  <not>
                     <instanceof value="org.eclipse.gmf.runtime.notation.Diagram">
                     </instanceof>
                  </not>
                  <adapt
                        type="org.eclipse.emf.ecore.EObject">
                  </adapt>
               </and>
            </enablement>
         </actionProvider>
         <dropAssistant class="org.eclipse.papyrus.views.modelexplorer.dnd.CommonDropAdapterAssistant" id="org.eclipse.papyrus.views.modelexplorer.dnd.CommonDropAdapterAssistant">
            <possibleDropTargets>
               <or>
                  <instanceof value="org.eclipse.gmf.runtime.notation.impl.DiagramImpl">
                  </instanceof>
                  <adapt
                        type="org.eclipse.emf.ecore.EObject">
                  </adapt>
               </or>
            </possibleDropTargets>
         </dropAssistant>
    
      </navigatorContent>
      <actionProvider
            class="org.eclipse.papyrus.views.modelexplorer.actionprovider.UndoRedoActionProvider"
            id="org.eclipse.papyrus.views.modelexplorer.actionprovider.UndoRedoActionProvider">
         <enablement>
            <or>
               <adapt
                     type="org.eclipse.emf.ecore.EObject">
               </adapt>
               <instanceof
                     value="org.eclipse.emf.ecore.EObject">
               </instanceof>
            </or>
         </enablement>
      </actionProvider>
      <commonFilter
            activeByDefault="true"
            class="org.eclipse.papyrus.infra.widgets.providers.PatternViewerFilter"
            id="org.eclipse.papyrus.views.modelexplorer.filter"
            name="search filter"
            visibleInUI="false">
      </commonFilter>
   </extension>
    <!--  
    <extension
         point="org.eclipse.papyrus.views.modelexplorer.actionHandler">

      <customAction
            actionHandler="org.eclipse.papyrus.views.modelexplorer.factory.DefaultEMFActionsFactory"
            actionId="org.eclipse.papyrus.views.modelexplorer.factory.defaultEMFActions"
            afterAction="org.eclipse.papyrus.views.modelexplorer.factory.renameAction"
            needSeparator="true">
      </customAction>
   </extension>
-->
<extension point="org.eclipse.ui.menus">

	<!-- ModelExplorer toolbar -->
	<menuContribution allPopups="false" locationURI="toolbar:org.eclipse.papyrus.views.modelexplorer.modelexplorer">

		<!-- Load modisco browser customization command -->		
		<command commandId="org.eclipse.papyrus.views.modelexplorer.LoadBrowserCustomization" icon="icons/etool16/uiCustom.gif" label="Load browser customization" style="push">
		</command>

		<!-- Search element command -->	
		
		<!-- Sort elements command -->	
		<command commandId="org.eclipse.papyrus.views.modelexplorer.sortelement" icon="icons/etool16/sort.gif" label="sort" style="toggle">
		</command>
  <command
        commandId="org.eclipse.papyrus.views.modelexplorer.expandall"
        icon="icons/etool16/expandall.png"
        label="Expand all at selected element"
        style="push">
  </command>
  <command
        commandId="org.eclipse.papyrus.views.modelexplorer.collapseall"
        icon="icons/etool16/collapseall.png"
        label="Collapse all at selected element"
        style="push">
  </command>
	</menuContribution>
 <menuContribution allPopups="false" locationURI="popup:org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup">
    <separator
          name="newelements"
          visible="true">
    </separator>
    <menu id="org.eclipse.papyrus.views.modelexplorer.popupmenu.createchild" label="New Child">
    </menu>
    <menu
          icon="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/icons/NewDiagram.gif"
          id="org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram"
          label="New Diagram">
    </menu>
    <command commandId="org.eclipse.ui.edit.delete" disabledIcon="IMG_TOOL_DELETE_DISABLED" icon="IMG_TOOL_DELETE" label="Delete" style="push" tooltip="Delete">
       <visibleWhen checkEnabled="true">
          <and>
             <with variable="selection">
                <iterate>
                   <adapt type="org.eclipse.emf.ecore.EObject">
                   </adapt>
                </iterate>
             </with>
          </and>
       </visibleWhen>
    </command>
    <separator name="rename" visible="true">
    </separator>
    <command commandId="org.eclipse.ui.edit.rename" icon="icons/etool16/rename.gif" id="org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup.rename" label="&amp;Rename" style="push" tooltip="Rename the element">
       <visibleWhen checkEnabled="true">
       </visibleWhen>
    </command>
    <separator name="command" visible="true">
    </separator>
    <command commandId="org.eclipse.ui.edit.undo" id="org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup.undo" label="&amp;Undo" style="push">
    </command>
    <command commandId="org.eclipse.ui.edit.redo" id="org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup.redo" label="&amp;Redo" style="push">
    </command>
    <separator name="diagramedit" visible="true">
    </separator>
    <command commandId="org.eclipse.papyrus.views.modelexplorer.popup.open.command" icon="icons/etool16/forward.gif" id="org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup.open" label="&amp;Open" style="push" tooltip="Open">
       <visibleWhen checkEnabled="true">
       </visibleWhen>
    </command>
    <command commandId="org.eclipse.papyrus.views.modelexplorer.popup.open.new.command" icon="icons/etool16/arrow_double.gif" id="org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup.open.new" label="Open In &amp;New Table" style="push" tooltip="Open in new tab">
       <visibleWhen checkEnabled="true">
       </visibleWhen>
    </command>
    <dynamic
          class="org.eclipse.papyrus.views.modelexplorer.actions.OpenWithMenu"
          id="org.eclipse.papyrus.views.modelexplorer.dynamicOpenWith">
    </dynamic>
    <command commandId="org.eclipse.papyrus.views.modelexplorer.popup.close.command" icon="icons/etool16/close.png" id="org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup.close" label="&amp;Close" style="push" tooltip="Close">
       <visibleWhen checkEnabled="true">
       </visibleWhen>
    </command>
    <command commandId="org.eclipse.papyrus.views.modelexplorer.close.all.command" icon="icons/etool16/closeAll.png" id="org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup.close.all" label="Close &amp;All" style="push" tooltip="Close All">
       <visibleWhen checkEnabled="true">
       </visibleWhen>
    </command>
    <separator name="edition" visible="true">
    </separator>
    <command commandId="org.eclipse.ui.edit.cut" id="org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup.cut" label="Cu&amp;t" style="push">
       <visibleWhen checkEnabled="false">
          <with variable="selection">
                <!-- We add this test in order to refresh the Cut action in the menu edit -->
             <test forcePluginActivation="true" property="org.eclipse.papyrus.views.modelexplorer.tester.isEObject" value="true">
             </test>
          </with>
       </visibleWhen>
    </command>
    <command commandId="org.eclipse.ui.edit.copy" id="org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup.copy" label="&amp;Copy" style="push">
       <visibleWhen checkEnabled="false">
          <with variable="selection">
                <!-- We add this test in order to refresh the Copy action in the menu edit -->
             <test forcePluginActivation="true" property="org.eclipse.papyrus.views.modelexplorer.tester.isEObject" value="true">
             </test>
          </with>
       </visibleWhen>
    </command>
    <command commandId="org.eclipse.ui.edit.paste" id="org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup.paste" label="&amp;Paste" style="push">
       <visibleWhen checkEnabled="false">
          <with variable="selection">
                <!-- We add this test in order to refresh the Paste action in the menu edit -->
             <test forcePluginActivation="true" property="org.eclipse.papyrus.views.modelexplorer.tester.isEObject" value="true">
             </test>
          </with>
       </visibleWhen>
    </command>
    <separator
          name="tools"
          visible="true">
    </separator>
    <separator
          name="others"
          visible="true">
    </separator>
    <separator
          name="additions"
          visible="false">
    </separator>
 </menuContribution>
	<!-- ModelExplorer Contextual menu -->       
       
</extension>

<!-- Command declarations (for model explorer toolbar and contextual menu -->
<extension point="org.eclipse.ui.commands">

	<!-- Command declaration : Load modisco browser customization command -->			
	<command categoryId="org.eclipse.papyrus.editor.category" defaultHandler="org.eclipse.papyrus.views.modelexplorer.handler.LoadBrowserCustomization" description="Load a customization for the papyrus browser" id="org.eclipse.papyrus.views.modelexplorer.LoadBrowserCustomization" name="Customize Model Explorer">
	</command>
	
	<!-- Command declaration : Search element command -->			
	<command categoryId="org.eclipse.papyrus.editor.category" defaultHandler="org.eclipse.papyrus.views.modelexplorer.handler.SearchElementHandler" description="Search an element in the model explorer" id="org.eclipse.papyrus.views.modelexplorer.searchelement" name="Quick Search">
	</command>
	
	<!-- Command declaration : Sort elements command -->			
	<command categoryId="org.eclipse.papyrus.editor.category" defaultHandler="org.eclipse.papyrus.views.modelexplorer.handler.SortElementHandler" description="Sort elements" id="org.eclipse.papyrus.views.modelexplorer.sortelement" name="Sort elements">
         <state
               class="org.eclipse.papyrus.views.modelexplorer.handler.SortElementState:org.eclipse.papyrus.views.modelexplorer.modelexplorer"
               id="org.eclipse.ui.commands.toggleState">
         </state>
	</command>
       
	<!-- Command declaration : Delete element command -->
	<command categoryId="org.eclipse.papyrus.editor.category" defaultHandler="org.eclipse.papyrus.views.modelexplorer.handler.DeleteCommandHandler" description="Delete" id="org.eclipse.papyrus.uml.service.creation.DeleteCommand" name="Delete">
	</command>
 <command
       categoryId="org.eclipse.papyrus.editor.category"
       defaultHandler="org.eclipse.papyrus.views.modelexplorer.handler.ExpandAllHandler"
       description="Expand All at selected Element"
       id="org.eclipse.papyrus.views.modelexplorer.expandall"
       name="Expand All at Selected Element (Ctrl+ Shift+ Numpad_Multiply)">
 </command>
 <command
       categoryId="org.eclipse.papyrus.editor.category"
       defaultHandler="org.eclipse.papyrus.views.modelexplorer.handler.CollapseAllHandler"
       description="Collapse All at selected Element"
       id="org.eclipse.papyrus.views.modelexplorer.collapseall"
       name="Collapse All at Selected Element (Ctrl+ Shift+ Numpad_Divide)">
 </command>       
</extension>
    
    
   <extension point="org.eclipse.core.runtime.preferences">
		<?gmfgen generated="false"?>
		<initializer class="org.eclipse.papyrus.views.modelexplorer.preferences.NavigatorPreferenceInitializer"/>
  <initializer
        class="org.eclipse.papyrus.views.modelexplorer.preferences.FilterPreferenceInitializer">
  </initializer>
  <initializer
        class="org.eclipse.papyrus.views.modelexplorer.preferences.ExpandPreferenceInitializer">
  </initializer>
   </extension>
   <extension point="org.eclipse.ui.preferencePages">
      <page category="org.eclipse.papyrus.infra.core.sasheditor.preferences.generalcategory" class="org.eclipse.papyrus.views.modelexplorer.preferences.ModelExplorerPreferencePage" id="org.eclipse.papyrus.views.modelexplorer.preferences.NavigatorPreferencePage" name="Model Explorer">
      </page>
   </extension>

<!-- This declaration is added in order command (DeleteCommandHandler) status to be
     verified (isVisible and isEnabled) before any attempt to execute the command, 
     and to mask the command in case it is not supported or executable.
  -->
<extension point="org.eclipse.ui.navigator.linkHelper">
   <linkHelper class="org.eclipse.papyrus.views.modelexplorer.LinkHelper" id="org.eclipse.papyrus.views.modelexplorer.linkHelper">
       <selectionEnablement>
         <instanceof value="java.lang.Object">
         </instanceof>
      </selectionEnablement>
      <editorInputEnablement>
         <instanceof value="org.eclipse.ui.IFileEditorInput">
         </instanceof>
      </editorInputEnablement>
   </linkHelper>
</extension>

<!-- This handler is activated when deleteInModelExplorer variable is valid.
  -->
<extension point="org.eclipse.ui.commands">
   <command categoryId="org.eclipse.papyrus.editor.category" description="The command to open in a tab" id="org.eclipse.papyrus.views.modelexplorer.popup.open.command" name="Open Command">
   </command>
   <command categoryId="org.eclipse.papyrus.editor.category" description="The command to open in a new tab" id="org.eclipse.papyrus.views.modelexplorer.popup.open.new.command" name="Open In New Tab Command">
   </command>
   <command categoryId="org.eclipse.papyrus.editor.category" description="The command to close" id="org.eclipse.papyrus.views.modelexplorer.popup.close.command" name="Close Command">
   </command>
   <command categoryId="org.eclipse.papyrus.editor.category" description="The command to close all " id="org.eclipse.papyrus.views.modelexplorer.close.all.command" name="Close All Command">
   </command>
   <command categoryId="org.eclipse.papyrus.editor.category" description="The Command to duplicate the selected element" id="org.eclipse.papyrus.views.modelexplorer.duplicate.command" name="Duplicate ">
   </command>
</extension>
<extension point="org.eclipse.ui.handlers">
   <handler commandId="org.eclipse.papyrus.views.modelexplorer.popup.close.command">
      <activeWhen>
         <with variable="selection">
            <and>
               <test forcePluginActivation="true" property="org.eclipse.papyrus.views.modelexplorer.tester.isPage" value="true">
               </test>
            </and>
         </with>
      </activeWhen>
      <class class="org.eclipse.papyrus.views.modelexplorer.handler.CloseHandler">
         <parameter name="close_parameter" value="selection">
         </parameter>
      </class>
   </handler>
   <handler commandId="org.eclipse.papyrus.views.modelexplorer.close.all.command">
      <class class="org.eclipse.papyrus.views.modelexplorer.handler.CloseHandler">
         <parameter name="close_parameter" value="all">
         </parameter>
      </class>
      <activeWhen>
         <with variable="selection">
            <and>
               <test forcePluginActivation="true" property="org.eclipse.papyrus.views.modelexplorer.tester.isPage" value="true">
               </test>
            </and>
         </with>
      </activeWhen>
   </handler>
   <handler commandId="org.eclipse.papyrus.views.modelexplorer.popup.open.command">
      <activeWhen>
         <with variable="selection">
            <and>
               <test forcePluginActivation="true" property="org.eclipse.papyrus.views.modelexplorer.tester.isPage" value="true">
               </test>
            </and>
         </with>
      </activeWhen>
      <class class="org.eclipse.papyrus.views.modelexplorer.handler.OpenHandler">
         <parameter name="open_parameter" value="close">
         </parameter>
      </class>
   </handler>
   <handler commandId="org.eclipse.papyrus.views.modelexplorer.popup.open.new.command">
      <activeWhen>
         <with variable="selection">
            <and>
               <test forcePluginActivation="true" property="org.eclipse.papyrus.views.modelexplorer.tester.isPage" value="true">
               </test>
            </and>
         </with>
      </activeWhen>
      <class class="org.eclipse.papyrus.views.modelexplorer.handler.OpenHandler">
         <parameter name="open_parameter" value="already_open">
         </parameter>
      </class>
   </handler>
   <handler class="org.eclipse.papyrus.views.modelexplorer.handler.CutHandler" commandId="org.eclipse.ui.edit.cut">
      <activeWhen>
         <and>
            <with variable="activePart">
               <instanceof value="org.eclipse.papyrus.views.modelexplorer.ModelExplorerPageBookView">
               </instanceof>
            </with>
            <with variable="selection">
                  <!-- We add this test in order to refresh the Cut action in the menu edit -->
               <test forcePluginActivation="true" property="org.eclipse.papyrus.views.modelexplorer.tester.isEObject" value="true">
               </test>
            </with>
         </and>
      </activeWhen>
   </handler>
   <handler class="org.eclipse.papyrus.views.modelexplorer.handler.UndoHandler" commandId="org.eclipse.ui.edit.undo">
      <activeWhen>
         <and>
            <with variable="activePart">
               <instanceof value="org.eclipse.papyrus.views.modelexplorer.ModelExplorerPageBookView">
               </instanceof>
            </with>
            <with variable="activePart">
                  <!-- We add this test in order to refresh the Undo action in the menu file -->
               <test forcePluginActivation="true" property="org.eclipse.papyrus.views.modelexplorer.tester.view.isModelExplorer" value="true">
               </test>
            </with>
         </and>
      </activeWhen>
   </handler>
   <handler class="org.eclipse.papyrus.views.modelexplorer.handler.RedoHandler" commandId="org.eclipse.ui.edit.redo">
      <activeWhen>
         <and>
            <with variable="activePart">
               <instanceof value="org.eclipse.papyrus.views.modelexplorer.ModelExplorerPageBookView">
               </instanceof>
            </with>
            <with variable="activePart">
                  <!-- We add this test in order to refresh the Redo action in the menu edit -->
               <test forcePluginActivation="true" property="org.eclipse.papyrus.views.modelexplorer.tester.view.isModelExplorer" value="true">
               </test>
            </with>
         </and>
      </activeWhen>
   </handler>
   <handler
         class="org.eclipse.papyrus.views.modelexplorer.handler.DeleteCommandHandler"
         commandId="org.eclipse.ui.edit.delete">
      <activeWhen>
         <with
               variable="selection">
            <and>
               <with
                     variable="activePart">
                  <instanceof
                        value="org.eclipse.papyrus.views.modelexplorer.ModelExplorerPageBookView">
                  </instanceof>
               </with>
               <test
                     forcePluginActivation="true"
                     property="org.eclipse.papyrus.views.modelexplorer.tester.isEObject"
                     value="true">
               </test>
            </and>
         </with>
      </activeWhen>
   </handler>
   <handler
         class="org.eclipse.papyrus.views.modelexplorer.handler.CopyHandler"
         commandId="org.eclipse.ui.edit.copy">
      <activeWhen>
         <and>
            <with
                  variable="activePart">
               <instanceof
                     value="org.eclipse.papyrus.views.modelexplorer.ModelExplorerPageBookView">
               </instanceof>
            </with>
            <with
                  variable="selection">
               <test
                     forcePluginActivation="true"
                     property="org.eclipse.papyrus.views.modelexplorer.tester.isEObject"
                     value="true">
               </test>
            </with>
         </and>
      </activeWhen>
   </handler>
    <handler
          class="org.eclipse.papyrus.views.modelexplorer.handler.PasteHandler"
          commandId="org.eclipse.ui.edit.paste">
       <activeWhen>
          <and>
             <with
                   variable="activePart">
                <instanceof
                      value="org.eclipse.papyrus.views.modelexplorer.ModelExplorerPageBookView">
                </instanceof>
             </with>
             <with
                   variable="selection">
                <test
                      forcePluginActivation="true"
                      property="org.eclipse.papyrus.views.modelexplorer.tester.isEObject"
                      value="true">
                </test>
             </with>
          </and>
       </activeWhen>
    </handler>
    <handler
          class="org.eclipse.papyrus.views.modelexplorer.handler.ExpandAllHandler"
          commandId="org.eclipse.ui.navigate.expandAll">
    </handler>   
</extension>
<extension point="org.eclipse.core.expressions.propertyTesters">
      <!-- the property tester is used to enabled/disabled handler -->
   <propertyTester class="org.eclipse.papyrus.views.modelexplorer.provider.PropertyTester" id="org.eclipse.papyrus.views.modelexplorer.tester" namespace="org.eclipse.papyrus.views.modelexplorer.tester" properties="isEObject,isPage,eClass" type="org.eclipse.jface.viewers.IStructuredSelection">
   </propertyTester>
   <propertyTester class="org.eclipse.papyrus.views.modelexplorer.provider.PropertyTester" id="org.eclipse.papyrus.views.modelexplorer.tester.view" namespace="org.eclipse.papyrus.views.modelexplorer.tester.view" properties="isModelExplorer" type="org.eclipse.ui.IWorkbenchPart">
   </propertyTester>
</extension>
<!-- 
TODO: PAPYRUS EMF-FACET update uiCustom Here
   <extension point="org.eclipse.papyrus.emf.facet.infra.query.registration">
      <modelqueryset file="resources/PapyrusEcoreBrowserQuery.querySet"/>
   </extension>
   <extension point="org.eclipse.papyrus.emf.facet.infra.browser.custom.core.registration">
      <browserCustomization file="resources/PapyrusEcoreBrowser.uiCustom"/>
   </extension>
   <extension point="org.eclipse.papyrus.emf.facet.infra.facet.registration">
      <facetset file="resources/PapyrusPages.facetSet"/>
   </extension>
   <extension point="org.eclipse.papyrus.emf.facet.infra.query.registration">
      <modelqueryset file="resources/PapyrusPages.querySet"/>
   </extension>
   <extension point="org.eclipse.papyrus.emf.facet.infra.browser.custom.core.registration">
      <browserCustomization
            file="resources/PapyrusPages.uiCustom"
            loadByDefault="true"/>
   </extension>
   -->
   <extension point="org.eclipse.papyrus.infra.services.labelprovider.labelProvider">
      <context description="The ModelExplorer labelProvider context" id="org.eclipse.papyrus.views.modelexplorer.labelProvider.context">
      </context>
   </extension>
   <extension
         point="org.eclipse.papyrus.infra.services.navigation.navigationContributor">
      <target
            description="Display an element in the ModelExplorer"
            id="org.eclipse.papyrus.views.modelexplorer.navigation.target"
            label="Show in ModelExplorer"
            navigationTargetProvider="org.eclipse.papyrus.views.modelexplorer.navigation.ModelExplorerNavigationTargetProvider"
            order="500">
      </target>
   </extension>
</plugin>

Back to the top