Skip to main content
summaryrefslogtreecommitdiffstats
blob: 99cd255a62429de443f592de44fc3ac42a2aafbc (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
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<!--
 Copyright (c) 2010, 2014 CEA and others.
 
 All rights reserved. This program and the accompanying materials
 are made available under the terms of the Eclipse Public License v1.0
 which accompanies this distribution, and is available at
 http://www.eclipse.org/legal/epl-v10.html
 
 Contributors:
   CEA - Initial API and implementation
   Christian W. Damus (CEA) - bug 323802
   
-->
<plugin>

<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">
	
	<!-- Papyrus single IClientContext declaration
	     This context can only be used explicitely as its matcher always return false ( in order
	     to avoid undesired activation and possible side effects)
	  -->
	<clientContext id="org.eclipse.papyrus.infra.services.edit.TypeContext">
		<matcher class="org.eclipse.papyrus.infra.services.edit.internal.matcher.NoContextEnablementMatcher"/>
	</clientContext>

</extension>

<extension
      point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
   <metamodel
         nsURI="http://www.eclipse.org/emf/2002/Ecore">
         
      <!-- Delete markers attached to objects being deleted. -->
      <adviceBinding
            id="org.eclipse.papyrus.infra.services.edit.markerDeletionAdvice"
            class="org.eclipse.papyrus.infra.services.edit.internal.advice.MarkerDeletionAdvice"
            typeId="*"
            inheritance="none">
      </adviceBinding>
   </metamodel>
</extension>

<!-- Binds general (non-UML specific) advices

     The notation dependant advice add a View deletion command for any View that references
     the EObject currently destroyed.
     
     Both the following advices are commonly used by GMF Runtime (and code generated by the tooling):
     - org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents
     - org.eclipse.gmf.runtime.diagram.core.advice.removeBookmarks
     
     The cross referencer is used to find any View referencing and EObject, as far as the Notation file 
     is loaded (does not mean each diagram is opened), every view related to an element will be deleted
     with the element deletion. These views may possibly be located in different diagrams.
     
     These advices are generally always added to the GMF default context. As the use of the extensible 
     type framework in Papyrus is currently used with an explicit unique context, it is important 
     to add these advices to this shared context to ensure the views are correctly deleted.
     
  -->
<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">

	<!-- Bindings declaration -->
	<binding context="org.eclipse.papyrus.infra.services.edit.TypeContext">
		
		<!-- ElementType that deals with View deletion when their related model element is deleted -->
		<elementType ref="org.eclipse.gmf.runtime.diagram.core.advice.notationDepdendents"/>
		<elementType ref="org.eclipse.gmf.runtime.diagram.core.advice.removeBookmarks"/>

        <!-- Check for attempts to edit read-only objects that cannot reasonably be made writeable. -->		
        <advice ref="org.eclipse.papyrus.infra.emf.readOnlyAdvice" />
        
        <!-- Delete markers attached to objects being deleted. -->
        <advice ref="org.eclipse.papyrus.infra.services.edit.markerDeletionAdvice" />
	</binding>
	
	<!-- 
	     In the default context, we also want to remove Papyrus Markers from deleted elements.
	     This is necessarily especially to ensure the advice is used in the deletion of dependent
	     elements (such as associations of which a member end is being deleted).
	-->
    <binding context="org.eclipse.gmf.runtime.emf.type.core.defaultContext">
        <!-- Delete markers attached to objects being deleted. -->
        <advice ref="org.eclipse.papyrus.infra.services.edit.markerDeletionAdvice" />
    </binding>

</extension>

<!-- Declaration of the IElementEditServiceProvider (Papyrus wrapper to the Extensible type framework) -->
<extension point="org.eclipse.papyrus.infra.core.service">

	<serviceFactory
		id="org.eclipse.papyrus.infra.services.edit.service.IElementEditServiceProvider"
		classname="org.eclipse.papyrus.infra.services.edit.internal.ElementEditServiceProviderFactory" 
		priority="1" startKind="startup">
 	</serviceFactory>

</extension>
   
   
</plugin>

Back to the top