Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 1184529fae329c917e2f4d0c5a9c2665a7efc3a2 (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
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>

<!-- Diagram declaration -->
<extension point="org.eclipse.papyrus.infra.core.papyrusDiagram">
	<creationCommand
		creationCommandClass="org.eclipse.papyrus.uml.diagram.pkg.PackageDiagramCreateCommand"
       creationCondition="org.eclipse.papyrus.uml.diagram.pkg.PackageDiagramCreationCondition"
		icon="icons/obj16/Diagram_Package.gif"
		id="org.eclipse.papyrus.uml.diagram.pkg.CreateCommand"
		language="uml"
		label="UML Package Diagram"/>
	<editorDiagram
		actionBarContributorId="org.eclipse.papyrus.uml.diagram.common.part.UMLDiagramActionBarContributor"
		factoryClass="org.eclipse.papyrus.uml.diagram.pkg.PackageDiagramEditorFactory"
		icon="icons/obj16/Diagram_Package.gif" />
</extension>

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

<extension point="org.eclipse.ui.handlers">
	<handler
		class="org.eclipse.papyrus.uml.diagram.pkg.CreatePackageDiagramWithNavigationHandler"
		commandId="org.eclipse.papyrus.uml.diagram.pkg.CreateCommand">
		<activeWhen>
			<with variable="activeEditorId">
				<equals value="org.eclipse.papyrus.infra.core.papyrusEditor" />
			</with>
		</activeWhen>
	</handler>
</extension>

<!-- Diagram creation command registration in menu and toolbar -->
<extension point="org.eclipse.ui.menus">

	<menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
	<menu id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams" label="Diagrams">
		<command commandId="org.eclipse.papyrus.uml.diagram.pkg.CreateCommand"
			icon="icons/obj16/Diagram_Package.gif" label="Create a new Package Diagram"
			style="push" tooltip="Create a new Package Diagram">
			<visibleWhen>
				<reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
			</visibleWhen>
					
		</command>
	</menu>
	</menuContribution>
	
	<menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
	<toolbar id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
		<command commandId="org.eclipse.papyrus.uml.diagram.pkg.CreateCommand"
			icon="icons/obj16/Diagram_Package.gif" label="Create a new Package Diagram"
			style="push" tooltip="Create a new Package Diagram">
			<visibleWhen>
				<reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
			</visibleWhen>
				
		</command>
	</toolbar>
	</menuContribution>
	
	<menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
		<command commandId="org.eclipse.papyrus.uml.diagram.pkg.CreateCommand"
			icon="icons/obj16/Diagram_Package.gif"
			label="Create a new Package Diagram"
			style="push"
			tooltip="Create a new Package Diagram">
			<visibleWhen>
				<reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
			</visibleWhen>
			
		</command>
	</menuContribution>
		
</extension>

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

<!-- Diagram view providers declaration -->
<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
	<!-- Diagram view provider -->
	<viewProvider class="org.eclipse.papyrus.uml.diagram.pkg.provider.PackageDiagramViewProvider">
		<Priority name="Low"/>
		<context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="Package"/>
	</viewProvider>
	
	<!-- ViewProvider for inherited elements (from ClassDiagram ViewProvider) -->
	<viewProvider class="org.eclipse.papyrus.uml.diagram.pkg.provider.InheritedClassDiagramViewProvider">
		<Priority name="Low"/>
		
		<!-- 
			"2007" = PACKAGE
			"3009" = PACKAGE_CN
			"2012" = COMMENT
			"3028" = COMMENT_CN
		  -->
		<context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2007, 3009, 2012, 3028"/>
		
		<!-- 
			"4008" = DEPENDENCY
			"4010" = PACKAGE_IMPORT
			"4013" = COMMENT_ANNOTATED_ELEMENT
		  -->
		<context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4008, 4010, 4013"/>
		
		<!-- Additional descriptors provided in case the semantic hint is is not provided -->	
		
		<!-- "uml.Package" -->
		<object id="uml.Package" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
			<method name="getProxyClassID()" value="uml.Package"/>
		</object>
		
		<!-- "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"/>
		</object>
		
		<!-- "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"/>
		</object>
		
		<!-- "uml.PackageImport" -->
		<object id="uml.PackageImport" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
			<method name="getProxyClassID()" value="uml.PackageImport"/>
		</object>
		
		<!-- Additional activation contexts for nodes semantic objects -->
		<context viewClass="org.eclipse.gmf.runtime.notation.Node"
			elements="uml.Package, uml.Comment"/>
		
		<!-- Additional activation contexts for edges semantic objects -->
		<context viewClass="org.eclipse.gmf.runtime.notation.Edge"
			elements="uml.Dependency, uml.PackageImport"/>
			
	</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.uml.diagram.pkg.provider.PackageDiagramEditPartProvider">
		<Priority name="Low"/>
		<object 
			id="org.eclipse.papyrus.uml.diagram.pkg.Diagram"
			class="org.eclipse.gmf.runtime.notation.Diagram">
			<method name="getType()" value="Package"/>
		</object>
		<context views="org.eclipse.papyrus.uml.diagram.pkg.Diagram"/>	
	</editpartProvider>
	
	<!-- EditPartProvider for inherited elements (from ClassDiagram) -->
	<editpartProvider class="org.eclipse.papyrus.uml.diagram.pkg.provider.InheritedClassDiagramEditPartProvider">
		<Priority name="Low"/>
		<!-- 
			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.		
			"2007" = PACKAGE
			"5026" = PACKAGE_LABEL_NAME_HINT
			"7016" = PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
			"3009" = PACKAGE_CN
			"5017" = PACKAGE_CN_LABEL_NAME_HINT
			"7010" = PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
			"2012" = COMMENT
			"5038" = COMMENT_LABEL_BODY_HINT
			"3028" = COMMENT_CN
			"5063" = COMMENT_CN_LABEL_BODY_HINT
		  -->
		<object
			id="PACKAGE"
			class="org.eclipse.gmf.runtime.notation.Node">
			<method name="getType()" value="2007, 5026, 7016"/>
		</object>
		<object
			id="PACKAGE_CN"
			class="org.eclipse.gmf.runtime.notation.Node">
			<method name="getType()" value="3009, 5017, 7010"/>
		</object>
		<object
			id="COMMENT"
			class="org.eclipse.gmf.runtime.notation.Node">
			<method name="getType()" value="2012, 5038"/>
		</object>
		<object
			id="COMMENT_CN"
			class="org.eclipse.gmf.runtime.notation.Node">
			<method name="getType()" value="3028, 5063"/>
		</object>
		
		
		<!-- 	
			"4008" = DEPENDENCY
			"6026" = DEPENDENCY_LABEL_DEPENDENCY_NAME_HINT
			"6027" = DEPENDENCY_LABEL_APPLIED_STEREOTYPE_DEPENDENCY_HINT
			"4010" = PACKAGE_IMPORT
			"6022" = PACKAGE_IMPORT_LABEL_APPLIED_STEREOTYPE_HINT
			"4013" = COMMENT_ANNOTATED_ELEMENT
		  -->
		<object
			id="DEPENDENCY"
			class="org.eclipse.gmf.runtime.notation.Edge">
			<method name="getType()" value="4008, 6026, 6027"/>
		</object>
		<object
			id="PACKAGE_IMPORT"
			class="org.eclipse.gmf.runtime.notation.Edge">
			<method name="getType()" value="4010, 6022"/>
		</object>
		<object
			id="COMMENT_ANNOTATED_ELEMENT"
			class="org.eclipse.gmf.runtime.notation.Edge">
			<method name="getType()" value="4013"/>
		</object>
		
		<context views="PACKAGE, PACKAGE_CN, COMMENT, COMMENT_CN"/>
		<context views="DEPENDENCY, PACKAGE_IMPORT, COMMENT_ANNOTATED_ELEMENT"/>
		
	</editpartProvider>
</extension>

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

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

	<!-- Diagram Preference pages declaration -->
	<page
		id="org.eclipse.papyrus.uml.diagram.pkg.preferences"
		name="Package Diagram"
		category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
		class="org.eclipse.papyrus.uml.diagram.pkg.preferences.PackageDiagramGeneralPreferencePage">
	</page>

	<!-- Element Preference pages declaration -->
	<page  	category="org.eclipse.papyrus.uml.diagram.pkg.preferences"
		class="org.eclipse.papyrus.uml.diagram.pkg.preferences.PackagePreferencePage"
		id="org.eclipse.papyrus.uml.diagram.pkg.preferences.PackagePreferencePage"
		name="Package">
	</page>
	
	
	
	
	<page  	category="org.eclipse.papyrus.uml.diagram.pkg.preferences"
		class="org.eclipse.papyrus.uml.diagram.pkg.preferences.CommentPreferencePage"
		id="org.eclipse.papyrus.uml.diagram.pkg.preferences.CommentPreferencePage"
		name="Comment">
	</page>
	
	
	
	
	<page  	category="org.eclipse.papyrus.uml.diagram.pkg.preferences"
		class="org.eclipse.papyrus.uml.diagram.pkg.preferences.DependencyPreferencePage"
		id="org.eclipse.papyrus.uml.diagram.pkg.preferences.DependencyPreferencePage"
		name="Dependency">
	</page>
	
	
	<page  	category="org.eclipse.papyrus.uml.diagram.pkg.preferences"
		class="org.eclipse.papyrus.uml.diagram.pkg.preferences.PackageImportPreferencePage"
		id="org.eclipse.papyrus.uml.diagram.pkg.preferences.PackageImportPreferencePage"
		name="PackageImport">
	</page>
	
	
	<page  	category="org.eclipse.papyrus.uml.diagram.pkg.preferences"
		class="org.eclipse.papyrus.uml.diagram.pkg.preferences.CommentLinkPreferencePage"
		id="org.eclipse.papyrus.uml.diagram.pkg.preferences.CommentLinkPreferencePage"
		name="CommentLink">
	</page>
	
	

</extension>
<extension
      id="stereotype-ep-provider"
      point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
   <editpartProvider
         class="org.eclipse.papyrus.uml.diagram.pkg.provider.StereotypePropertiesEditPartProvider">
      <Priority
            name="Medium">
      </Priority>
      <object
            class="org.eclipse.gmf.runtime.notation.Node(org.eclipse.gmf.runtime.notation)"
            id="org.eclipse.papyrus.uml.diagram.clazz.editpart.AppliedStereotypeContainer">
         <method
               name="getType()"
               value="AppliedStereotypeContainer,AppliedStereotypeProperty">
         </method>
      </object>
   </editpartProvider>
</extension>

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

<!-- Insert custom extensions here. -->
  
<!-- // End of user code 
  -->

</plugin>

Back to the top