Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: e249da1e89bc87e555539f73645492ed1197a931 (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
568
569
570
571
572
573
574
575
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
         point="org.eclipse.papyrus.infra.viewpoints.policy.custom">
      <contribution
            file="model/InternalBlockDiagram.configuration"
            original="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration">
      </contribution>
   </extension>
   
<!-- Diagram declaration -->
<extension point="org.eclipse.papyrus.infra.ui.papyrusDiagram">
	<creationCommand creationCommandClass="org.eclipse.papyrus.sysml.diagram.internalblock.InternalBlockDiagramCreateCommand" creationCondition="org.eclipse.papyrus.sysml.diagram.internalblock.InternalBlockDiagramCondition" icon="icons/obj16/Diagram_InternalBlock.gif" id="org.eclipse.papyrus.sysml.diagram.internalblock.CreateCommand" language="sysml" label="Internal Block Diagram"></creationCommand>
	<editorDiagram actionBarContributorId="org.eclipse.papyrus.uml.diagram.common.part.UMLDiagramActionBarContributor" factoryClass="org.eclipse.papyrus.sysml.diagram.internalblock.InternalBlockDiagramEditorFactory" icon="icons/obj16/Diagram_InternalBlock.gif"></editorDiagram>
</extension>

<!-- Diagram creation command and handler -->
<extension point="org.eclipse.ui.commands">
	<command id="org.eclipse.papyrus.sysml.diagram.internalblock.CreateCommand" name="Create a new Internal Block Diagram" description="Create a new Internal Block Diagram" categoryId="org.eclipse.papyrus.editor.category"></command>
</extension>

   

<!-- Diagram creation command registration in menu and toolbar -->

<!-- Palette tool definition (defines tools possibly used by the palette(s)) -->
<extension point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders" name="SYSML_InternalBlock_Predefined_Entries" id="org.eclipse.papyrus.sysml.diagram.blockdefinition.palettedefinition"> 
		
	<paletteProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider">
	<Priority name="Lowest"></Priority> <!-- Lower priority than Palette tool declaration -->
	
	<!-- SysML Internal Block Diagram specific tool definition -->
	<contribution factoryClass="org.eclipse.papyrus.sysml.diagram.internalblock.factory.DiagramPaletteFactory">
			
		<!-- internalblock.tool.block -->
		<entry defineOnly="true" description="Create a Block" id="internalblock.tool.block" kind="tool" label="Block" large_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Block.gif" small_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/blocks/Block.gif">
		</entry>
			
		<!-- internalblock.tool.blockpropertycomposite -->
		<entry defineOnly="true" description="Create a BlockPropertyComposite" id="internalblock.tool.blockpropertycomposite" kind="tool" label="BlockPropertyComposite" large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif" small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif">
		</entry>
			
		<!-- internalblock.tool.flowport -->
		<entry defineOnly="true" description="Create a FlowPort" id="internalblock.tool.flowport" kind="tool" label="FlowPort" large_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort.gif" small_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort.gif">
		</entry>
			
		<!-- internalblock.tool.port -->
		<entry defineOnly="true" description="Create a Port" id="internalblock.tool.port" kind="tool" label="Port" large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Port.gif" small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Port.gif">
		</entry>
		<!-- Start of user code Custom node button entry  -->
		
		<!-- internalblock.tool.property -->
		<entry defineOnly="true" description="Create a Property" id="internalblock.tool.property" kind="tool" label="Property" large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif" small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif">
		</entry>
		
		<!-- internalblock.tool.part -->
		<entry defineOnly="true" description="Create a Part" id="internalblock.tool.part" kind="tool" label="Part" large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif" small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif">
		</entry>
		
		<!-- internalblock.tool.reference -->
		<entry defineOnly="true" description="Create a Reference" id="internalblock.tool.reference" kind="tool" label="Reference" large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif" small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif">
		</entry>

		<!-- internalblock.tool.actorpart -->
		<entry defineOnly="true" description="Create an ActorPart" id="internalblock.tool.actorpart" kind="tool" label="ActorPart" large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif" small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif">
		</entry>
		
		<!-- internalblock.tool.value -->
		<entry defineOnly="true" description="Create a Value" id="internalblock.tool.value" kind="tool" label="Value" large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif" small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif">
		</entry>
				
		<!-- internalblock.tool.flowport (IN) -->
		<entry defineOnly="true" description="Create a FlowPort (IN)" id="internalblock.tool.flowport_in" kind="tool" label="FlowPort" large_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_IN.gif" small_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_IN.gif">
		</entry>

		<!-- internalblock.tool.flowport (OUT) -->
		<entry defineOnly="true" description="Create a FlowPort (OUT)" id="internalblock.tool.flowport_out" kind="tool" label="FlowPort" large_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_OUT.gif" small_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_OUT.gif">
		</entry>
		
		<!-- internalblock.tool.flowport (INOUT) -->
		<entry defineOnly="true" description="Create a FlowPort (INOUT)" id="internalblock.tool.flowport_inout" kind="tool" label="FlowPort" large_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_INOUT.gif" small_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_INOUT.gif">
		</entry>

		<!-- internalblock.tool.flowport -->
		<entry defineOnly="true" description="Create a FlowPort (non atomic)" id="internalblock.tool.flowport_na" kind="tool" label="FlowPort (non atomic)" large_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_NA.gif" small_icon="platform:/plugin/org.eclipse.papyrus.sysml/icons/portandflows/FlowPort_NA.gif">
		</entry>
				
		<!-- internalblock.tool.comment -->
		<entry defineOnly="true" description="Create a Comment" id="internalblock.tool.comment" kind="tool" label="Comment" large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif" small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif">
		</entry>
		
		<!-- internalblock.tool.constraint -->
		<entry defineOnly="true" description="Create a Constraint" id="internalblock.tool.constraint" kind="tool" label="Constraint" large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif" small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif">
		</entry>
								
		<!-- End of user code  -->
		
			
		<!-- internalblock.tool.connector -->
		<entry defineOnly="true" description="Create a Connector" id="internalblock.tool.connector" kind="tool" label="Connector" large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Connector.gif" small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Connector.gif">
		</entry>
			
		<!-- internalblock.tool.dependency -->
		<entry defineOnly="true" description="Create a Dependency" id="internalblock.tool.dependency" kind="tool" label="Dependency" large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif" small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Dependency.gif">
		</entry>
		<!-- Start of user code Custom edge button entry  -->
		
		<!-- internalblock.tool.comment_constraint_link -->
		<entry defineOnly="true" description="Create a Comment / Constraint link" id="internalblock.tool.comment_constraint_link" kind="tool" label="Comment / Constraint link" large_icon="icons/obj16/Link.gif" small_icon="icons/obj16/Link.gif">
		</entry>
			
		<!-- End of user code  -->
			
	</contribution>
	
	<!-- Specify diagram this palette tools relate to -->				
	<editor id="org.eclipse.papyrus.sysml.diagram.internalblock"></editor>
	
	</paletteProvider>	
</extension>

<!-- Palette tool declaration (declares the real palette containment) -->
<extension point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition" name="SYSML_InternalBlock">
	
	<paletteDefinition ID="SYSML_InternalBlock" class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider" name="SYSML_InternalBlock" icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif" path="palettes/internalblock.palette.xml" provider="CEA LIST">
		<Priority name="Low"></Priority>
		
		<!-- Specify diagram this palette tools relate to -->						
		<editor id="org.eclipse.papyrus.sysml.diagram.internalblock"></editor>
	</paletteDefinition>
</extension>

<!-- Diagram view providers declaration -->
<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders">

	<!-- Diagram view provider -->
	<viewProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.InternalBlockDiagramViewProvider">
		<Priority name="Low"></Priority>
		<context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="InternalBlock"></context>
	</viewProvider>

	<!-- Custom graphical types view provider -->
	<viewProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.CustomViewProvider">
		<Priority name="Medium"></Priority>
		<context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="UML::Property, SysML::ActorPartProperty, SysML::ValueProperty, SysML::ReferenceProperty, SysML::FlowPort_In, UML::Port, SysML::FlowPort_Out, SysML::PartProperty, SysML::FlowPort_InOut, SysML::FlowPort, SysML::Block, SysML::FlowPort_NA"></context>
		<context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="shape_sysml_flowport_as_affixed, shape_sysml_block_as_composite, shape_uml_port_as_affixed, shape_sysml_blockproperty_as_composite, compartment_sysml_blockproperty_structure"></context>
		<context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="UML::Dependency, UML::Connector"></context>
		<context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="link_uml_connector, link_uml_dependency"></context>
		
		<!-- Additional descriptors provided in case the semantic hint is is not provided -->	
		
		<!-- "uml.Class" -->
		<object id="uml.Class" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
			<method name="getProxyClassID()" value="uml.Class"></method>
		</object>
		<context
        elements="uml.Class"
        viewClass="org.eclipse.gmf.runtime.notation.Node"></context>			
		
		<!-- "uml.Port" -->
		<object id="uml.Port" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
			<method name="getProxyClassID()" value="uml.Port"></method>
		</object>
		<context viewClass="org.eclipse.gmf.runtime.notation.Node" elements="uml.Port"></context>			
		
		<!-- "uml.Property" -->
		<object id="uml.Property" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
			<method name="getProxyClassID()" value="uml.Property"></method>
		</object>
		<context viewClass="org.eclipse.gmf.runtime.notation.Node"  elements="uml.Property"></context>			
		
		<!-- "uml.Connector" -->
		<object id="uml.Connector" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
			<method name="getProxyClassID()" value="uml.Connector"></method>
		</object>
		<context viewClass="org.eclipse.gmf.runtime.notation.Edge" elements="uml.Connector"></context>			
		
		<!-- "uml.Dependency" -->
		<object id="uml.Dependency" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
			<method name="getProxyClassID()" value="uml.Dependency"></method>
		</object>
		<context viewClass="org.eclipse.gmf.runtime.notation.Edge" elements="uml.Dependency"></context>
 
 
 	 <object id="elementtype.node"
        class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
       
     <method
           name="getSemanticHint()"
           value="UML::Property, SysML::ActorPartProperty, SysML::ValueProperty, SysML::ReferenceProperty, SysML::FlowPort_In, UML::Port, SysML::FlowPort_Out, SysML::PartProperty, SysML::FlowPort_InOut, SysML::FlowPort, SysML::Block, SysML::FlowPort_NA">
     </method>
  </object>
  <context
        elements="elementtype.node"
        viewClass="org.eclipse.gmf.runtime.notation.Node">
  </context>
  <object id="elementtype.edge"
        class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
     <method
           name="getSemanticHint()"
           value="UML::Dependency, UML::Connector">
     </method>
  </object>
  <context
        elements="elementtype.edge"
        viewClass="org.eclipse.gmf.runtime.notation.Edge">
  </context>			
		
	</viewProvider>	

	<!-- ViewProvider for inherited elements (from CompositeDiagram ViewProvider) -->
	<viewProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.InheritedCompositeDiagramViewProvider">
		<Priority name="Low"></Priority>
		
		<!-- Load the ViewProvider on following SemanticHint related to IElementType(s) used in the palette (also used for legacy elements) -->
		<context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="UML::Comment, UML::Constraint"></context>
		
		<!-- 
			"2109" = COMMENT
			"3097" = COMMENT_CN
			"2114" = CONSTRAINT								
			"3120" = CONSTRAINT_CN
		  -->			
		<context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2109, 3097, 2114, 3120"></context>
		
		<!-- 
			"4002" = COMMENT_ANNOTATED_ELEMENT
			"4003" = CONSTRAINT_CONSTRAINED_ELEMENT
		  -->
		<context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4002, 4003"></context>
        
		<!-- Additional descriptors provided in case the semantic hint is is not provided -->	
		
        <!-- "uml.Comment" -->
		<object id="uml.Comment" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
			<method name="getProxyClassID()" value="uml.Comment"></method>
		</object>

        <!-- "uml.Constraint" -->
		<object id="uml.Constraint" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
			<method name="getProxyClassID()" value="uml.Constraint"></method>
		</object>

		<!-- Additional activation contexts for nodes semantic objects -->
		<context viewClass="org.eclipse.gmf.runtime.notation.Node" elements="uml.Comment, uml.Constraint"></context>
			
	</viewProvider>
	
</extension>

<!-- Diagram edit part providers declaration -->
<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">

	<!-- Diagram edit part provider -->
	<editpartProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.InternalBlockDiagramEditPartProvider">
		<Priority name="Low"></Priority>
		<object id="org.eclipse.papyrus.sysml.diagram.internalblock.Diagram" class="org.eclipse.gmf.runtime.notation.Diagram">
			<method name="getType()" value="InternalBlock"></method>
		</object>
		<context views="org.eclipse.papyrus.sysml.diagram.internalblock.Diagram"></context>	
	</editpartProvider>
	
	<!-- Custom graphical types edit part provider -->
	<editpartProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.CustomEditPartProvider">
		<Priority name="Medium"></Priority>
	
		<object class="org.eclipse.gmf.runtime.notation.Node(org.eclipse.gmf.runtime.notation)" id="org.eclipse.papyrus.sysml.diagram.internalblock.CustomNodeGraphicalTypes">
			<method name="getType()" value="shape_sysml_flowport_as_affixed, shape_sysml_block_as_composite, shape_uml_port_as_affixed, shape_sysml_blockproperty_as_composite"></method>
		</object>
		
		<object class="org.eclipse.gmf.runtime.notation.Node(org.eclipse.gmf.runtime.notation)" id="org.eclipse.papyrus.sysml.diagram.internalblock.CustomGraphicalTypes_Decorations">
			<method name="getType()" value="linklabel_uml_connector_target_multiplicity, label_uml_property_label, linklabel_uml_appliedstereotype, label_sysml_block_name, compartment_sysml_structure, affixedlabel_uml_port_label, linklabel_uml_connector_source_multiplicity, linklabel_uml_namedelement_name, linklabel_uml_connector_label, compartment_sysml_blockproperty_structure, affixedlabel_uml_appliedstereotype, affixedlabel_sysml_flowport_label"></method>
		</object>
		
		<context views="org.eclipse.papyrus.sysml.diagram.internalblock.CustomNodeGraphicalTypes"></context>
		<context views="org.eclipse.papyrus.sysml.diagram.internalblock.CustomGraphicalTypes_Decorations"></context>
	
		<object class="org.eclipse.gmf.runtime.notation.Edge(org.eclipse.gmf.runtime.notation)" id="org.eclipse.papyrus.sysml.diagram.internalblock.CustomEdgeGraphicalTypes">
			<method name="getType()" value="link_uml_connector, link_uml_dependency"></method>
		</object>
		
		<context views="org.eclipse.papyrus.sysml.diagram.internalblock.CustomEdgeGraphicalTypes"></context>
		
	</editpartProvider>
	
	<!-- EditPartProvider for inherited elements (from CompositeDiagram) -->
	<editpartProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.InheritedCompositeDiagramEditPartProvider">
		<Priority name="Low"></Priority>
		
		<!-- 
			The semantic hints given here are used in case the provider is not already loaded.
			As soon as the provider is loaded its provides method is used.
			"2109" = COMMENT
			"5192" = COMMENT_LABEL_BODY_HINT
			"3097" = COMMENT_CN
			"5150" = COMMENT_CN_LABEL_BODY_HINT
			"2114" = CONSTRAINT
			"5197" = CONSTRAINT_LABEL_NAME_HINT
			"6039" = CONSTRAINT_LABEL_SPECIFICATION_HINT
			"3120" = CONSTRAINT_CN
			"6048" = CONSTRAINT_CN_LABEL_NAME_HINT
			"6049" = CONSTRAINT_CN_LABEL_SPECIFICATION_HINT
		 -->			
		<object id="COMMENT" class="org.eclipse.gmf.runtime.notation.Node">
			<method name="getType()" value="2109, 5192"></method>
		</object>
		<object id="COMMENT_CN" class="org.eclipse.gmf.runtime.notation.Node">
			<method name="getType()" value="3097, 5150"></method>
		</object>
		<object id="CONSTRAINT" class="org.eclipse.gmf.runtime.notation.Node">
			<method name="getType()" value="2114, 5197, 6039"></method>
		</object>
		<object id="CONSTRAINT_CN" class="org.eclipse.gmf.runtime.notation.Node">
			<method name="getType()" value="3120, 6048, 6049"></method>
		</object>

		<!-- 	
			"4002" = COMMENT_ANNOTATED_ELEMENT
			"4003" = CONSTRAINT_CONSTRAINED_ELEMENT
		  -->
		<object id="COMMENT_ANNOTATED_ELEMENT" class="org.eclipse.gmf.runtime.notation.Edge">
			<method name="getType()" value="4002"></method>
		</object>
		<object id="CONSTRAINT_CONSTRAINED_ELEMENT" class="org.eclipse.gmf.runtime.notation.Edge">
			<method name="getType()" value="4003"></method>
		</object>

		<context views="COMMENT, COMMENT_CN, CONSTRAINT, CONSTRAINT_CN"></context>
		<context views="COMMENT_ANNOTATED_ELEMENT, CONSTRAINT_CONSTRAINED_ELEMENT"></context>
		
	</editpartProvider>
	
</extension>

<!-- Diagram edit policy provider -->	
<extension point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
	<editpolicyProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.CustomEditPolicyProvider">
		<Priority name="Low"></Priority>
	</editpolicyProvider>
</extension>

<!-- Preference pages declaration -->
<extension point="org.eclipse.ui.preferencePages" id="prefpages">

	<!-- Diagram Preference pages declaration -->
	<page id="org.eclipse.papyrus.sysml.diagram.internalblock.preferences" name="Internal Block Diagram" category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams" class="org.eclipse.papyrus.sysml.diagram.internalblock.preferences.InternalBlockDiagramGeneralPreferencePage">
	</page>

</extension>

<!-- // Start of user code custom extensions 
  -->

<!-- Insert custom extensions here. -->



<!-- 
	Handler declaration for the Interface Manager Command. 
	The handler is enabled only if the selected element is a Port (excluding FlowPort) in an InternalBlockDiagram.
  -->
<extension point="org.eclipse.ui.handlers">

	<handler commandId="org.eclipse.papyrus.sysml.diagram.internalblock.command.manage.interfaces" class="org.eclipse.papyrus.sysml.diagram.internalblock.handler.InternalBlockManageInterfacesHandler">
		<activeWhen>
		<and>
			<with variable="selection">
			<iterate>
				<instanceof value="org.eclipse.papyrus.uml.diagram.common.edit.part.PortAffixedNodeEditPart"></instanceof>
			</iterate>
			</with>
			
			<with variable="activeEditor">
			<test property="org.eclipse.papyrus.uml.diagram.common.diagram.tester.diagramType" value="InternalBlock" forcePluginActivation="true"></test>
			</with>
			
			<with variable="selection">
			<test property="org.eclipse.papyrus.sysml.diagram.internalblock.tester.selection.isFlowPort" value="false" forcePluginActivation="true"></test>              
			</with>
		</and>
		</activeWhen>
	</handler>
</extension>

<!-- 
	Add a property tester for this diagram. 
	The tested properties allow to enable/disable handlers for commands .
  -->
<extension point="org.eclipse.core.expressions.propertyTesters">
	<propertyTester id="org.eclipse.papyrus.sysml.diagram.internalblock.tester.selection" type="org.eclipse.jface.viewers.ISelection" namespace="org.eclipse.papyrus.sysml.diagram.internalblock.tester.selection" properties="isFlowPort" class="org.eclipse.papyrus.sysml.diagram.internalblock.utils.InternalBlockDiagramTester">
	</propertyTester>
</extension>

<!-- The Command to manages the Provided and Required Interfaces for a Port-->
<extension point="org.eclipse.ui.commands">
	<command categoryId="org.eclipse.papyrus.editor.category" id="org.eclipse.papyrus.sysml.diagram.internalblock.command.manage.interfaces" name="Manage Provided Interfaces" description="Allows to manage easily provided Interfaces for a Port">
	</command>
</extension>

<!-- Add the Menu to manages the Provided and Required Interfaces for a Port-->
<extension point="org.eclipse.ui.menus">
	<menuContribution locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu?endof=editMenu" allPopups="false">
	<command commandId="org.eclipse.papyrus.sysml.diagram.internalblock.command.manage.interfaces" icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Interface.gif" id="org.eclipse.papyrus.sysml.diagram.internalblock.popup.interface.manage.interface" label="Manage Interfaces" mnemonic="&amp;I" style="push" tooltip="The command to manage the interfaces provided and required by a Port">
		<!-- The action is visible only if there is an active handler for it  -->
		<visibleWhen checkEnabled="true"></visibleWhen>
	</command>
	</menuContribution>
</extension>

<!-- Parser provider declaration -->
<extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders">
	<ParserProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.ParserProvider">
		<Priority name="Low"></Priority>
	</ParserProvider>
</extension>

<!-- Diagram specific advices -->
<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">

	<metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">

	<!-- Property specific advices (remove inconsistent views when a Property type is set) -->		
	<adviceBinding id="org.eclipse.papyrus.sysml.diagram.internalblock.PropertyHelperAdvice" class="org.eclipse.papyrus.sysml.diagram.internalblock.helper.advice.PropertyHelperAdvice" inheritance="all" typeId="org.eclipse.papyrus.uml.Property">
	</adviceBinding>
	
	<!-- Delete moved views advice -->		
	<adviceBinding id="org.eclipse.papyrus.sysml.diagram.internalblock.DeleteViewDuringMoveHelperAdvice" class="org.eclipse.papyrus.sysml.diagram.internalblock.helper.advice.DeleteViewDuringMoveHelperAdvice" inheritance="all" typeId="org.eclipse.papyrus.uml.Element">
	</adviceBinding>
				
	</metamodel>
</extension>

<!-- UML ElementType bindings to Papyrus shared IClientContext -->
<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">

	<!-- Bindings declaration to shared IClientContext -->
	<binding context="org.eclipse.papyrus.infra.services.edit.TypeContext">	
		<elementType ref="org.eclipse.papyrus.sysml.diagram.internalblock.PropertyHelperAdvice"></elementType>
		<elementType ref="org.eclipse.papyrus.sysml.diagram.internalblock.DeleteViewDuringMoveHelperAdvice"></elementType>
	</binding>
		
</extension>

<!-- Service for Show/Hide content on Part or Ref. -->
<extension point="org.eclipse.ui.services">
	<sourceProvider provider="org.eclipse.papyrus.sysml.diagram.internalblock.provider.ActionStateSourceProvider">
		<variable name="showHideRelatedContents" priorityLevel="workbench"></variable>
	</sourceProvider>
</extension>

<!-- Handler for Show/Hide content on Part or Ref. -->
<extension point="org.eclipse.ui.handlers">
	<handler class="org.eclipse.papyrus.sysml.diagram.internalblock.handler.ShowHideRelatedContentsHandler" commandId="org.eclipse.papyrus.uml.diagram.menu.commands.ShowHideContentsCommand">
		<activeWhen>
		<and>
			<with variable="activeEditor">
				<test property="org.eclipse.papyrus.uml.diagram.common.diagram.tester.diagramType" value="InternalBlock" forcePluginActivation="true"></test>
			</with>	
			<with variable="showHideRelatedContents">
				<equals value="enabled"></equals>
			</with>
			<with variable="selection">
				<iterate ifEmpty="false" operator="and">
					<instanceof value="org.eclipse.papyrus.sysml.diagram.parametric.edit.part.CustomBlockCompositeEditPartTN"></instanceof>
				</iterate>
			</with>
		</and>
		</activeWhen>
	</handler>
</extension>

<!-- Validation markers declaration -->
<extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
	<MarkerNavigationProvider class="org.eclipse.papyrus.gmf.diagram.common.provider.MarkerNavigationProvider">
		<MarkerType name="org.eclipse.papyrus.sysml.diagram.internalblock.diagnostic"></MarkerType>
		<Priority name="Lowest"></Priority>
	</MarkerNavigationProvider>
</extension>

<extension id="diagnostic" name="Internal Block Diagram  problems" point="org.eclipse.core.resources.markers">
	<super type="org.eclipse.core.resources.problemmarker"></super>
	<super type="org.eclipse.gmf.runtime.common.ui.services.marker"></super>
	<persistent value="true"></persistent>
</extension>

<extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
	<decoratorProvider class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.ValidationDecoratorProvider">
		<Priority name="Lowest"></Priority>
		<object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"></object>
		<context decoratorTargets="PRIMARY_VIEW"></context>
	</decoratorProvider>
</extension>



<!-- // End of user code 
  -->
<extension point="org.eclipse.papyrus.infra.gmfdiag.common.notationTypesMapping">
   <diagramMappings diagramID="InternalBlock">
      <mapping type="InternalBlock" humanReadableType="InternalBlockDiagram"/>
      <!-- Compartments -->
      <mapping
             humanReadableType="structure"
             type="compartment_sysml_structure">
      </mapping>
      
      <mapping
             humanReadableType="structure"
             type="compartment_sysml_blockproperty_structure">
      </mapping>
   
                      <!-- Link labels -->

      <mapping
             humanReadableType="Name"
             type="affixedlabel_sysml_flowport_label">
      </mapping>
      
      <mapping
             humanReadableType="Stereotype"
             type="affixedlabel_uml_appliedstereotype">
      </mapping>
      
      <mapping
             humanReadableType="Label"
             type="affixedlabel_uml_port_label">
      </mapping>
   
      <mapping
             humanReadableType="Stereotype"
             type="linklabel_uml_appliedstereotype">
      </mapping>
      
      <mapping
             humanReadableType="Name"
             type="linklabel_uml_connector_label">
      </mapping>
      
      <mapping
             humanReadableType="SourceMultiplicity"
             type="linklabel_uml_connector_source_multiplicity">
      </mapping>
      
      <mapping
             humanReadableType="TargetMultiplicity"
             type="linklabel_uml_connector_target_multiplicity">
      </mapping>
      
      <mapping
             humanReadableType="Name"
             type="linklabel_uml_namedelement_name">
      </mapping>
   
          </diagramMappings>
   </extension>
 
<extension id="org.eclipse.papyrus.sysml.diagram.internalblock.migration" name="InternalBlockMigration" point="org.eclipse.papyrus.infra.gmfdiag.common.diagramReconciler">
   <diagramReconciler
         diagramType="InternalBlock"
         reconcilerClass="org.eclipse.papyrus.sysml.diagram.internalblock.migration.InternalBlockDiagramReconcilierUndefinedTo100"
         source="undefined"
         target="1.1.0">
   </diagramReconciler>
</extension>

   <extension
         point="org.eclipse.papyrus.infra.gmfdiag.common.visualTypeProviders">
      <visualTypeProvider
            class="org.eclipse.papyrus.sysml.diagram.internalblock.provider.InternalBlockVisualTypeProvider"
            diagramType="InternalBlock">
      </visualTypeProvider>
   </extension>

</plugin>

Back to the top