Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 8af25a0e906b3dec5ba1265ac2b043dc439a7052 (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
/*
 * Copyright (c) 2007, 2009 Borland Software Corporation
 * 
 * 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:
 *    Dmitry Stadnik (Borland) - initial API and implementation
 */

«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
«EXTENSION xpt::diagram::Utils»
«EXTENSION xpt::GenEditorGenerator»

«DEFINE plugin FOR gmfgen::GenPlugin-»
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
«EXPAND xpt::Common::xcopyright FOR editorGen-»
<plugin>
«EXPAND fileTypes-»
«EXPAND extension_parser-»
«EXPAND xpt::editor::extensions::extensions FOR editorGen-»
«EXPAND menu-»
«EXPAND validation FOR editorGen.diagram-»
«EXPAND metrics FOR editorGen.metrics-»
«EXPAND xpt::diagram::preferences::extensions::extensions FOR editorGen.diagram-»
«EXPAND xpt::propsheet::extensions::extensions FOR editorGen.propertySheet-»
«EXPAND xpt::providers::extensions::extensions FOR editorGen.diagram-»
«EXPAND xpt::navigator::extensions::extensions FOR editorGen.navigator-»
«EXPAND xpt::application::extensions::extensions FOR editorGen.application-»
«EXPAND xpt::ConstraintProviders::extensions FOR editorGen-»
«EXPAND xpt::diagram::updater::extensions::extensions FOR editorGen.diagramUpdater-»
«EXPAND impl::actions::extensions::Main FOR editorGen-»
«EXPAND additions-»
</plugin>
«ENDDEFINE»

«DEFINE fileTypes FOR gmfgen::GenPlugin»
   <extension point="org.eclipse.team.core.fileTypes" id="repo-ftype">
      «EXPAND xpt::Common::xmlGeneratedTag»
      <fileTypes type="text" extension="«editorGen.diagramFileExtension»"/>
   </extension>
«ENDDEFINE»

«DEFINE extension_parser FOR gmfgen::GenPlugin»
   <extension point="org.eclipse.emf.ecore.extension_parser" id="resource-factory">
      «EXPAND xpt::Common::xmlGeneratedTag»
      <parser
         type="«editorGen.diagramFileExtension»"
         class="org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory">
      </parser>
   </extension>
«ENDDEFINE»

«DEFINE menu FOR gmfgen::GenPlugin»
   <extension point="org.eclipse.gmf.runtime.common.ui.services.action.globalActionHandlerProviders" id="global-actions">
      «EXPAND xpt::Common::xmlGeneratedTag»
      <GlobalActionHandlerProvider
         class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandlerProvider"
         id="«editorGen.modelID»Presentation">
         <Priority name="Lowest"/>
         <ViewId id="«editorGen.editor.iD»">
            <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart">
               <GlobalActionId actionId="delete"/>
            </ElementType>
            <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart">
               <GlobalActionId actionId="save"/>
            </ElementType>
         </ViewId>
      </GlobalActionHandlerProvider>
«IF printingEnabled-»
      <GlobalActionHandlerProvider
         class="org.eclipse.gmf.runtime.diagram.ui.printing.render.providers.DiagramWithPrintGlobalActionHandlerProvider"
         id="«editorGen.modelID»PresentationPrint">
         <Priority name="Lowest"/>
         <ViewId id="«editorGen.editor.iD»">
            <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart">
               <GlobalActionId actionId="print"/>
            </ElementType>
         </ViewId>
      </GlobalActionHandlerProvider>
«ENDIF-»
«IF null = editorGen.application-»
      <GlobalActionHandlerProvider
         class="org.eclipse.gmf.runtime.diagram.ui.providers.ide.providers.DiagramIDEGlobalActionHandlerProvider"
         id="«editorGen.modelID»PresentationIDE">
         <Priority name="Lowest"/>
         <ViewId id="«editorGen.editor.iD»">
            <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart">
               <GlobalActionId actionId="bookmark"/>
            </ElementType>
         </ViewId>
      </GlobalActionHandlerProvider>
«ENDIF-»
      <GlobalActionHandlerProvider
            class="org.eclipse.gmf.runtime.diagram.ui.render.providers.DiagramUIRenderGlobalActionHandlerProvider"
            id="«editorGen.modelID»Render">
         <Priority name="Lowest"/>
         <ViewId id="«editorGen.editor.iD»">
            <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart">
               <GlobalActionId actionId="cut"/>
               <GlobalActionId actionId="copy"/>
               <GlobalActionId actionId="paste"/>
            </ElementType>
         </ViewId>
      </GlobalActionHandlerProvider>
   </extension>

«ENDDEFINE»

«DEFINE metrics FOR gmfgen::GenMetricContainer-»
«IF metrics->size() > 0»
   <extension id="metrics-view" point="org.eclipse.ui.views">
      «EXPAND xpt::Common::xmlGeneratedTag»
   	  <view class="«editorGen.diagram.getMetricProviderQualifiedClassName()»$ResultView"
			id="«editorGen.diagram.getMetricViewID()»"
			name="«editorGen.modelID» Diagram Metrics"/>
   </extension>
«ENDIF-»
«ENDDEFINE»

«DEFINE validation FOR gmfgen::GenDiagram-»
«IF validationEnabled or hasAudits(editorGen)-»
«IF null = editorGen.application-»

   <extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
      «EXPAND xpt::Common::xmlGeneratedTag»
      <MarkerNavigationProvider class="«getMarkerNavigationProviderQualifiedClassName()»">
         <MarkerType name="«editorGen.plugin.iD + '.' + getValidationDiagnosticMarkerType()»"/>
         <Priority name="«markerNavigationProviderPriority»"/>
      </MarkerNavigationProvider>
   </extension>

   <extension id="«getValidationDiagnosticMarkerType()»" name="«editorGen.plugin.name» problems" point="org.eclipse.core.resources.markers">
      «EXPAND xpt::Common::xmlGeneratedTag»
      <super type="org.eclipse.core.resources.problemmarker"/>
      <super type="org.eclipse.gmf.runtime.common.ui.services.marker"/>
      <persistent value="true"/>
   </extension>   
«ENDIF-»
«IF validationDecorators-»

   <extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
      «EXPAND xpt::Common::xmlGeneratedTag»
      <decoratorProvider class="«getValidationDecoratorProviderQualifiedClassName()»">
         <Priority name="«validationDecoratorProviderPriority»"/>
         <object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"/>
         <context decoratorTargets="PRIMARY_VIEW"/>
      </decoratorProvider>
   </extension>
«ENDIF-»
«ENDIF-»
«ENDDEFINE»

«DEFINE additions FOR gmfgen::GenPlugin»«ENDDEFINE»

Back to the top