1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
2 | <?eclipse version="3.4"?> |
---|
3 | <plugin> |
---|
4 | |
---|
5 | <extension |
---|
6 | point="org.eclipse.ui.views"> |
---|
7 | <view |
---|
8 | name="Modelica Models Synchronization" |
---|
9 | icon="icons/code.png" |
---|
10 | category="org.openmodelica.modelicaml.category" |
---|
11 | class="org.openmodelica.modelicaml.modelica.importer.views.ModelicaOMCCodeViewer" |
---|
12 | id="org.openmodelica.modelicaml.modelica.importer.views.ModelicaOMCCodeViewer"> |
---|
13 | </view> |
---|
14 | </extension> |
---|
15 | <extension |
---|
16 | point="org.eclipse.ui.perspectiveExtensions"> |
---|
17 | <perspectiveExtension |
---|
18 | targetID="org.openmodelica.modelicaml.perspective"> |
---|
19 | <view |
---|
20 | ratio="0.5" |
---|
21 | relative="org.openmodelica.modelicaml.view.componentstree" |
---|
22 | relationship="bottom" |
---|
23 | id="org.openmodelica.modelicaml.modelica.importer.views.ModelicaOMCCodeViewer"> |
---|
24 | </view> |
---|
25 | </perspectiveExtension> |
---|
26 | </extension> |
---|
27 | <extension |
---|
28 | point="org.eclipse.help.contexts"> |
---|
29 | <contexts |
---|
30 | file="contexts.xml"> |
---|
31 | </contexts> |
---|
32 | </extension> |
---|
33 | |
---|
34 | <!-- NOTE: all marker types are defined in the mml.common plugin |
---|
35 | <extension |
---|
36 | id="org.openmodelica.modelicaml.marker.modelicamlproxies" |
---|
37 | name="Modelica Model Proxies Synchronization" |
---|
38 | point="org.eclipse.core.resources.markers"> |
---|
39 | <super |
---|
40 | type="org.eclipse.emf.validation.problem"> |
---|
41 | </super> |
---|
42 | <super |
---|
43 | type="org.eclipse.emf.ecore.diagnostic"> |
---|
44 | </super> |
---|
45 | <super |
---|
46 | type="org.eclipse.core.resources.marker"> |
---|
47 | </super> |
---|
48 | <persistent |
---|
49 | value="false"> |
---|
50 | </persistent> |
---|
51 | </extension> |
---|
52 | <extension |
---|
53 | id="org.openmodelica.modelicaml.marker.modelicaloading" |
---|
54 | name="OMC Modelica Models Loading" |
---|
55 | point="org.eclipse.core.resources.markers"> |
---|
56 | <super |
---|
57 | type="org.eclipse.emf.validation.problem"> |
---|
58 | </super> |
---|
59 | <super |
---|
60 | type="org.eclipse.emf.ecore.diagnostic"> |
---|
61 | </super> |
---|
62 | <super |
---|
63 | type="org.eclipse.core.resources.marker"> |
---|
64 | </super> |
---|
65 | <persistent |
---|
66 | value="false"> |
---|
67 | </persistent> |
---|
68 | </extension> |
---|
69 | --> |
---|
70 | <extension |
---|
71 | point="org.eclipse.ui.menus"> |
---|
72 | <menuContribution |
---|
73 | allPopups="false" |
---|
74 | locationURI="toolbar:org.eclipse.ui.main.toolbar"> |
---|
75 | <toolbar |
---|
76 | id="org.openmodelica.modelicaml.modelica.toolbar" |
---|
77 | label="ModelicaML Modelica Models Synchronization"> |
---|
78 | <separator |
---|
79 | name="org.openmodelica.modelicaml.modelica.importer.separator3"> |
---|
80 | </separator> |
---|
81 | <command |
---|
82 | commandId="org.openmodelica.modelicaml.modelica.commands.synchronizemodelicamodelproxies" |
---|
83 | icon="icons/code.png" |
---|
84 | label="Synchronize Modelica Models" |
---|
85 | style="push" |
---|
86 | tooltip="Synchronize Modelica Models"> |
---|
87 | <visibleWhen> |
---|
88 | <with |
---|
89 | variable="activeEditorId"> |
---|
90 | <equals |
---|
91 | value="org.eclipse.papyrus.infra.core.papyrusEditor"> |
---|
92 | </equals> |
---|
93 | </with> |
---|
94 | </visibleWhen> |
---|
95 | </command> |
---|
96 | <visibleWhen |
---|
97 | checkEnabled="false"> |
---|
98 | <with |
---|
99 | variable="activeWorkbenchWindow.activePerspective"> |
---|
100 | <equals |
---|
101 | value="org.openmodelica.modelicaml.perspective"> |
---|
102 | </equals> |
---|
103 | </with> |
---|
104 | </visibleWhen> |
---|
105 | </toolbar> |
---|
106 | </menuContribution> |
---|
107 | <menuContribution |
---|
108 | allPopups="false" |
---|
109 | locationURI="popup:org.eclipse.papyrus.modelexplorer.modelexplorer.popup"> |
---|
110 | <menu |
---|
111 | icon="icons/code2.png" |
---|
112 | label="ModelicaML: Modelica Models Synchronization"> |
---|
113 | <command |
---|
114 | commandId="org.openmodelica.modelicaml.modelica.commands.disconnectfromcodesync" |
---|
115 | icon="icons/launch_disconnect.gif" |
---|
116 | style="push"> |
---|
117 | </command> |
---|
118 | <command |
---|
119 | commandId="org.openmodelica.modelicaml.modelica.commands.connecttocodesync" |
---|
120 | icon="icons/connect_co.gif" |
---|
121 | style="push"> |
---|
122 | </command> |
---|
123 | <visibleWhen |
---|
124 | checkEnabled="false"> |
---|
125 | <with |
---|
126 | variable="activeWorkbenchWindow.activePerspective"> |
---|
127 | <equals |
---|
128 | value="org.openmodelica.modelicaml.perspective"> |
---|
129 | </equals> |
---|
130 | <and> |
---|
131 | <with |
---|
132 | variable="selection"> |
---|
133 | <count |
---|
134 | value="1"> |
---|
135 | </count> |
---|
136 | <iterate> |
---|
137 | <adapt |
---|
138 | type="org.eclipse.emf.ecore.EObject"> |
---|
139 | <and> |
---|
140 | <or> |
---|
141 | <test |
---|
142 | args="ModelicaML::ModelReferences::ModelicaModelProxy" |
---|
143 | property="org.openmodelica.modelicaml.testers.hasStereotype"> |
---|
144 | </test> |
---|
145 | <instanceof |
---|
146 | value="org.eclipse.uml2.uml.Class"> |
---|
147 | </instanceof> |
---|
148 | <instanceof |
---|
149 | value="org.eclipse.uml2.uml.Package"> |
---|
150 | </instanceof> |
---|
151 | <test |
---|
152 | args="ModelicaML::ModelicaClassConstructs::Block" |
---|
153 | property="org.openmodelica.modelicaml.testers.hasStereotype"> |
---|
154 | </test> |
---|
155 | <test |
---|
156 | args="ModelicaML::ModelicaClassConstructs::Model" |
---|
157 | property="org.openmodelica.modelicaml.testers.hasStereotype"> |
---|
158 | </test> |
---|
159 | <test |
---|
160 | args="ModelicaML::ModelicaClassConstructs::ModelicaClass" |
---|
161 | property="org.openmodelica.modelicaml.testers.hasStereotype"> |
---|
162 | </test> |
---|
163 | <test |
---|
164 | args="ModelicaML::ModelicaClassConstructs::ModelicaPackage" |
---|
165 | property="org.openmodelica.modelicaml.testers.hasStereotype"> |
---|
166 | </test> |
---|
167 | <test |
---|
168 | args="ModelicaML::ModelicaClassConstructs::Function" |
---|
169 | property="org.openmodelica.modelicaml.testers.hasStereotype"> |
---|
170 | </test> |
---|
171 | <test |
---|
172 | args="ModelicaML::ModelicaClassConstructs::Connector" |
---|
173 | property="org.openmodelica.modelicaml.testers.hasStereotype"> |
---|
174 | </test> |
---|
175 | <test |
---|
176 | args="ModelicaML::ModelicaClassConstructs::Record" |
---|
177 | property="org.openmodelica.modelicaml.testers.hasStereotype"> |
---|
178 | </test> |
---|
179 | </or> |
---|
180 | </and> |
---|
181 | </adapt> |
---|
182 | </iterate> |
---|
183 | </with> |
---|
184 | </and> |
---|
185 | </with> |
---|
186 | </visibleWhen> |
---|
187 | </menu> |
---|
188 | </menuContribution> |
---|
189 | </extension> |
---|
190 | <extension |
---|
191 | point="org.eclipse.ui.commands"> |
---|
192 | <command |
---|
193 | id="org.openmodelica.modelicaml.modelica.commands.synchronizemodelicamodelproxies" |
---|
194 | name="Synchronize Modelica Models"> |
---|
195 | </command> |
---|
196 | <command |
---|
197 | id="org.openmodelica.modelicaml.modelica.commands.disconnectfromcodesync" |
---|
198 | name="Disconnect From Modelica Models Synchronization"> |
---|
199 | </command> |
---|
200 | <command |
---|
201 | id="org.openmodelica.modelicaml.modelica.commands.connecttocodesync" |
---|
202 | name="Connect To Modelica Models Synchronization"> |
---|
203 | </command> |
---|
204 | </extension> |
---|
205 | <extension |
---|
206 | point="org.eclipse.ui.handlers"> |
---|
207 | <handler |
---|
208 | class="org.openmodelica.modelicaml.modelica.importer.handlers.SynchronizeModelicaModelProxiesHandler" |
---|
209 | commandId="org.openmodelica.modelicaml.modelica.commands.synchronizemodelicamodelproxies"> |
---|
210 | </handler> |
---|
211 | <handler |
---|
212 | class="org.openmodelica.modelicaml.modelica.importer.handlers.DisconnectFromCodeSyncHandler" |
---|
213 | commandId="org.openmodelica.modelicaml.modelica.commands.disconnectfromcodesync"> |
---|
214 | <activeWhen> |
---|
215 | <with |
---|
216 | variable="selection"> |
---|
217 | <count |
---|
218 | value="1"> |
---|
219 | </count> |
---|
220 | <iterate> |
---|
221 | <adapt |
---|
222 | type="org.eclipse.emf.ecore.EObject"> |
---|
223 | <and> |
---|
224 | <test |
---|
225 | args="ModelicaML::ModelReferences::ModelicaModelProxy" |
---|
226 | property="org.openmodelica.modelicaml.testers.hasStereotype"> |
---|
227 | </test> |
---|
228 | </and> |
---|
229 | </adapt> |
---|
230 | </iterate> |
---|
231 | </with> |
---|
232 | </activeWhen> |
---|
233 | </handler> |
---|
234 | <handler |
---|
235 | class="org.openmodelica.modelicaml.modelica.importer.handlers.ConnectToCodeSyncHandler" |
---|
236 | commandId="org.openmodelica.modelicaml.modelica.commands.connecttocodesync"> |
---|
237 | <activeWhen> |
---|
238 | <with |
---|
239 | variable="selection"> |
---|
240 | <count |
---|
241 | value="1"> |
---|
242 | </count> |
---|
243 | <iterate> |
---|
244 | <adapt |
---|
245 | type="org.eclipse.emf.ecore.EObject"> |
---|
246 | <and> |
---|
247 | <or> |
---|
248 | <test |
---|
249 | args="ModelicaML::ModelicaClassConstructs::Block" |
---|
250 | property="org.openmodelica.modelicaml.testers.hasStereotype"> |
---|
251 | </test> |
---|
252 | <test |
---|
253 | args="ModelicaML::ModelicaClassConstructs::Model" |
---|
254 | property="org.openmodelica.modelicaml.testers.hasStereotype"> |
---|
255 | </test> |
---|
256 | <test |
---|
257 | args="ModelicaML::ModelicaClassConstructs::ModelicaClass" |
---|
258 | property="org.openmodelica.modelicaml.testers.hasStereotype"> |
---|
259 | </test> |
---|
260 | <test |
---|
261 | args="ModelicaML::ModelicaClassConstructs::ModelicaPackage" |
---|
262 | property="org.openmodelica.modelicaml.testers.hasStereotype"> |
---|
263 | </test> |
---|
264 | <test |
---|
265 | args="ModelicaML::ModelicaClassConstructs::Function" |
---|
266 | property="org.openmodelica.modelicaml.testers.hasStereotype"> |
---|
267 | </test> |
---|
268 | <test |
---|
269 | args="ModelicaML::ModelicaClassConstructs::Connector" |
---|
270 | property="org.openmodelica.modelicaml.testers.hasStereotype"> |
---|
271 | </test> |
---|
272 | <test |
---|
273 | args="ModelicaML::ModelicaClassConstructs::Record" |
---|
274 | property="org.openmodelica.modelicaml.testers.hasStereotype"> |
---|
275 | </test> |
---|
276 | <instanceof |
---|
277 | value="org.eclipse.uml2.uml.Package"> |
---|
278 | </instanceof> |
---|
279 | </or> |
---|
280 | <and> |
---|
281 | <not> |
---|
282 | <test |
---|
283 | args="ModelicaML::ModelReferences::ModelicaModelProxy" |
---|
284 | property="org.openmodelica.modelicaml.testers.hasStereotype"> |
---|
285 | </test> |
---|
286 | </not> |
---|
287 | </and> |
---|
288 | </and> |
---|
289 | </adapt> |
---|
290 | </iterate> |
---|
291 | </with> |
---|
292 | </activeWhen> |
---|
293 | </handler> |
---|
294 | </extension> |
---|
295 | |
---|
296 | </plugin> |
---|