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