source: trunk/modelicaml/org.openmodelica.modelicaml.modelica.importer/plugin.xml @ 1634

Last change on this file since 1634 was 1630, checked in by wschamai, 12 years ago

BUG FIX: validation rules
MOD: validate action activated again, old is deactivated
BUG FIX: creation of extends relation (no cycles for anonym classes)
BUG FIX: components tree ISelection usage

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