|
1 /* |
|
2 * Copyright (c) 2007 Borland Software Corporation |
|
3 * |
|
4 * All rights reserved. This program and the accompanying materials |
|
5 * are made available under the terms of the Eclipse Public License v1.0 |
|
6 * which accompanies this distribution, and is available at |
|
7 * http://www.eclipse.org/legal/epl-v10.html |
|
8 * |
|
9 * Contributors: |
|
10 * Dmitry Stadnik (Borland) - initial API and implementation |
|
11 */ |
|
12 |
|
13 «IMPORT "http://www.eclipse.org/gmf/2008/GenModel"» |
|
14 «IMPORT "http://www.eclipse.org/emf/2002/Ecore"» |
|
15 «EXTENSION xpt::diagram::Utils» |
|
16 «EXTENSION xpt::GenEditorGenerator» |
|
17 |
|
18 «DEFINE plugin FOR gmfgen::GenPlugin-» |
|
19 <?xml version="1.0" encoding="UTF-8"?> |
|
20 <?eclipse version="3.0"?> |
|
21 «EXPAND xpt::Common::xcopyright FOR editorGen-» |
|
22 <plugin> |
|
23 |
|
24 <extension point="org.eclipse.team.core.fileTypes"> |
|
25 «EXPAND xpt::Common::xmlGeneratedTag» |
|
26 <fileTypes |
|
27 type="text" |
|
28 extension="«editorGen.diagramFileExtension»"> |
|
29 </fileTypes> |
|
30 </extension> |
|
31 |
|
32 <extension point="org.eclipse.emf.ecore.extension_parser"> |
|
33 «EXPAND xpt::Common::xmlGeneratedTag» |
|
34 <parser |
|
35 type="«editorGen.diagramFileExtension»" |
|
36 class="org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory"> |
|
37 </parser> |
|
38 </extension> |
|
39 |
|
40 «EXPAND xpt::editor::extensions::extensions FOR editorGen-» |
|
41 «EXPAND menu-» |
|
42 «EXPAND validation FOR editorGen.diagram-» |
|
43 «EXPAND metrics FOR editorGen.metrics-» |
|
44 «EXPAND xpt::diagram::preferences::extensions::extensions FOR editorGen.diagram-» |
|
45 «EXPAND xpt::propsheet::extensions::extensions FOR editorGen.propertySheet-» |
|
46 «EXPAND xpt::providers::extensions::extensions FOR editorGen.diagram-» |
|
47 «EXPAND xpt::navigator::extensions::extensions FOR editorGen.navigator-» |
|
48 «EXPAND xpt::application::extensions::extensions FOR editorGen.application-» |
|
49 «EXPAND xpt::ConstraintProviders::extensions FOR editorGen-» |
|
50 «EXPAND xpt::diagram::updater::extensions::extensions FOR editorGen.diagramUpdater-» |
|
51 «EXPAND additions-» |
|
52 </plugin> |
|
53 «ENDDEFINE» |
|
54 |
|
55 «DEFINE menu FOR gmfgen::GenPlugin-» |
|
56 |
|
57 <extension point="org.eclipse.gmf.runtime.common.ui.services.action.globalActionHandlerProviders"> |
|
58 «EXPAND xpt::Common::xmlGeneratedTag» |
|
59 <GlobalActionHandlerProvider |
|
60 class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandlerProvider" |
|
61 id="«editorGen.modelID»Presentation"> |
|
62 <Priority name="Lowest"/> |
|
63 <ViewId id="«editorGen.editor.iD»"> |
|
64 <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart"> |
|
65 <GlobalActionId actionId="delete"/> |
|
66 </ElementType> |
|
67 <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart"> |
|
68 <GlobalActionId actionId="save"/> |
|
69 </ElementType> |
|
70 </ViewId> |
|
71 </GlobalActionHandlerProvider> |
|
72 «IF printingEnabled-» |
|
73 <GlobalActionHandlerProvider |
|
74 class="org.eclipse.gmf.runtime.diagram.ui.printing.render.providers.DiagramWithPrintGlobalActionHandlerProvider" |
|
75 id="«editorGen.modelID»PresentationPrint"> |
|
76 <Priority name="Lowest"/> |
|
77 <ViewId id="«editorGen.editor.iD»"> |
|
78 <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart"> |
|
79 <GlobalActionId actionId="print"/> |
|
80 </ElementType> |
|
81 </ViewId> |
|
82 </GlobalActionHandlerProvider> |
|
83 «ENDIF-» |
|
84 «IF null == editorGen.application-» |
|
85 <GlobalActionHandlerProvider |
|
86 class="org.eclipse.gmf.runtime.diagram.ui.providers.ide.providers.DiagramIDEGlobalActionHandlerProvider" |
|
87 id="«editorGen.modelID»PresentationIDE"> |
|
88 <Priority name="Lowest"/> |
|
89 <ViewId id="«editorGen.editor.iD»"> |
|
90 <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart"> |
|
91 <GlobalActionId actionId="bookmark"/> |
|
92 </ElementType> |
|
93 </ViewId> |
|
94 </GlobalActionHandlerProvider> |
|
95 «ENDIF-» |
|
96 <GlobalActionHandlerProvider |
|
97 class="org.eclipse.gmf.runtime.diagram.ui.render.providers.DiagramUIRenderGlobalActionHandlerProvider" |
|
98 id="«editorGen.modelID»Render"> |
|
99 <Priority name="Lowest"/> |
|
100 <ViewId id="«editorGen.editor.iD»"> |
|
101 <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart"> |
|
102 <GlobalActionId actionId="cut"/> |
|
103 <GlobalActionId actionId="copy"/> |
|
104 <GlobalActionId actionId="paste"/> |
|
105 </ElementType> |
|
106 </ViewId> |
|
107 </GlobalActionHandlerProvider> |
|
108 </extension> |
|
109 |
|
110 «IF printingEnabled-» |
|
111 <extension point="org.eclipse.gmf.runtime.common.ui.services.action.contributionItemProviders"> |
|
112 «EXPAND xpt::Common::xmlGeneratedTag» |
|
113 <contributionItemProvider class="«editorGen.diagram.getContributionItemProviderQualifiedClassName()»"> |
|
114 <Priority name="Low"/> |
|
115 <partContribution id="«editorGen.editor.iD»"> |
|
116 <partAction menubarPath="/file/print" id="printPreviewAction"/> |
|
117 </partContribution> |
|
118 </contributionItemProvider> |
|
119 </extension> |
|
120 «ENDIF-» |
|
121 «ENDDEFINE» |
|
122 |
|
123 «DEFINE metrics FOR gmfgen::GenMetricContainer-» |
|
124 «IF metrics.size() > 0-» |
|
125 |
|
126 <extension id="MetricContributionItemProvider" name="Metrics" |
|
127 point="org.eclipse.gmf.runtime.common.ui.services.action.contributionItemProviders"> |
|
128 «EXPAND xpt::Common::xmlGeneratedTag» |
|
129 <contributionItemProvider checkPluginLoaded="true" class="«editorGen.diagram.getMetricProviderQualifiedClassName()»"> |
|
130 <Priority name="«editorGen.diagram.metricProviderPriority»"/> |
|
131 <partContribution id="«editorGen.editor.iD»"> |
|
132 <partMenuGroup menubarPath="/diagramMenu/" id="validationGroup"/> |
|
133 <partAction id="metricsAction" menubarPath="/diagramMenu/validationGroup"/> |
|
134 </partContribution> |
|
135 </contributionItemProvider> |
|
136 </extension> |
|
137 |
|
138 <extension point="org.eclipse.ui.views"> |
|
139 «EXPAND xpt::Common::xmlGeneratedTag» |
|
140 <view class="«editorGen.diagram.getMetricProviderQualifiedClassName()»$ResultView" |
|
141 id="«editorGen.diagram.getMetricViewID()»" |
|
142 name="«editorGen.modelID» Diagram Metrics"/> |
|
143 </extension> |
|
144 «ENDIF-» |
|
145 «ENDDEFINE» |
|
146 |
|
147 «DEFINE validation FOR gmfgen::GenDiagram-» |
|
148 «IF validationEnabled || editorGen.hasAudits()-» |
|
149 «IF validationEnabled-» |
|
150 |
|
151 <extension id="ValidationContributionItemProvider" name="Validation" |
|
152 point="org.eclipse.gmf.runtime.common.ui.services.action.contributionItemProviders"> |
|
153 «EXPAND xpt::Common::xmlGeneratedTag» |
|
154 <contributionItemProvider |
|
155 class="«getValidationProviderQualifiedClassName()»"> |
|
156 <Priority name="«validationProviderPriority»"/> |
|
157 <partContribution id="«editorGen.editor.iD»"> |
|
158 <partMenuGroup menubarPath="/diagramMenu/" id="validationGroup"/> |
|
159 <partAction id="validateAction" menubarPath="/diagramMenu/validationGroup"/> |
|
160 </partContribution> |
|
161 </contributionItemProvider> |
|
162 </extension> |
|
163 «ENDIF-» |
|
164 «IF null == editorGen.application-» |
|
165 |
|
166 <extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders"> |
|
167 «EXPAND xpt::Common::xmlGeneratedTag» |
|
168 <MarkerNavigationProvider class="«getMarkerNavigationProviderQualifiedClassName()»"> |
|
169 <MarkerType name="«editorGen.plugin.iD + "." + getValidationDiagnosticMarkerType()»"/> |
|
170 <Priority name="«markerNavigationProviderPriority»"/> |
|
171 </MarkerNavigationProvider> |
|
172 </extension> |
|
173 |
|
174 <extension id="«getValidationDiagnosticMarkerType()»" name="«editorGen.plugin.name» problems" point="org.eclipse.core.resources.markers"> |
|
175 «EXPAND xpt::Common::xmlGeneratedTag» |
|
176 <super type="org.eclipse.core.resources.problemmarker"/> |
|
177 <super type="org.eclipse.gmf.runtime.common.ui.services.marker"/> |
|
178 <persistent value="true"/> |
|
179 </extension> |
|
180 «ENDIF-» |
|
181 «IF validationDecorators-» |
|
182 |
|
183 <extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders"> |
|
184 «EXPAND xpt::Common::xmlGeneratedTag» |
|
185 <decoratorProvider class="«getValidationDecoratorProviderQualifiedClassName()»"> |
|
186 <Priority name="«validationDecoratorProviderPriority»"/> |
|
187 <object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"/> |
|
188 <context decoratorTargets="PRIMARY_VIEW"/> |
|
189 </decoratorProvider> |
|
190 </extension> |
|
191 «ENDIF-» |
|
192 «ENDIF-» |
|
193 «ENDDEFINE» |
|
194 |
|
195 «DEFINE additions FOR gmfgen::GenPlugin»«ENDDEFINE» |