|Applying stereotypes to metaclass of UML meta model middleweight extension [message #647801]
||Sun, 09 January 2011 12:45
| Kirsten M. Z.
Registered: July 2010
maybe the title already explains what I am trying to do.
I have created an UML2 meta model extension. Please consider the following Ecore file for this:
<?xml version="1.0" encoding="UTF-8"?>
<eClassifiers xsi:type="ecore:EClass" name="ClassEx" eSuperTypes="platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Class">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="ex" eType="ecore:EDataType platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Integer"/>
For creating the profile, I decided to use static UML profiles, and I followed this approach:
It works fine so far. Thanks to Alexander Nyßen!
Now, I wanted to create a profile with two stereotypes (one for checking the concept only):
StereotypeBasic which extends <<metaclass>> uml::Class
StereotypeEx which shall extend <<metaclass>> my::ClassEx
The first problem I am facing: How can I get "<<metaclass>> ClassEx" into my profile? Of course, this not possible first. So I experimented "faking" another "http://my" meta model by creating an "my.metamodel.uml" which extends "UML.metamodel.uml". Of course, I am using the Ecore and Standard profile there for applying "<<ePackage>>", "<<metamodel>>" and "<<metaclass>>" stereotypes. I tried "copying" the style of the "UML.metamodel.uml". This way, I was able to use "<<metaclass>> my::ClassEx" in my profile.
Afterwards, I used the aprroach of static UML profiles, so I created a genmodel for my profile. However, I have edited the generated stuff in order to use my old "my.ecore" and "my.genmodel" (A new one is generated, because of "my.metamodel.uml", but this should not be used, right?)
Finally, I generate my model code, start a new Eclipse workbench with all plug-ins loaded. The problem: I can apply my stereotype "StereotypeBasic" to all "uml::Class" (also "my::ClassEx") of my model, but I am not able to apply "StereotypeEx" to "my::ClassEx".
Does anyone think/know if it is (im-)possible?
Thanks in advance!
[Updated on: Sun, 09 January 2011 12:48]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02435 seconds