Transformation between UML profiles [message #548002] |
Tue, 20 July 2010 07:33  |
Eclipse User |
|
|
|
Hi, I have been trying to find a way to create transformation between two UML profiles (models defined in these two profiles) that I have created in Eclipse Modeling Framework. I tried with ATL and QVT, but it seems that these two transformation languages are only able to execute transformations between models for which their metamodels are defined in ecore. That's OK and I understand that this is because ATL and QVT are implemented as metamodels in ecore. However, if I try to make transformations between UML profiles, both these transformations aren't working. Since UML and UML profiles are defined in ecore metamodel I thought that this could be possible.
So my question is: Can I use ATL, QVT or some other transformation language to make transformations between UML profiles (that is models defined in my own UML profiles in eclipse)?
Any help will be so gratefully appreciated!
|
|
|
|
|
|
|
|
Re: Transformation between UML profiles [message #548713 is a reply to message #548002] |
Thu, 22 July 2010 13:25   |
Eclipse User |
|
|
|
When I follow the above tutorial, I get *.ecore file of my profile, which is nice and good. However, it seems that the uml metamodel in ecore is referenced somehow by ecore metamodel of profile, thus I can not create dynamic instance of "package" or "model", for example, from the ecore metamodel of my profile. I only get the stereotypes in ecore file that I have defined in profile, and even if I make dynamic instance of those stereotypes it seems as if generalization of those stereotypes from uml concepts didn't work...
What I am trying to say is that if I make extension stereotype of uml:Class element, stereotype doesn't inherit attributes of uml:Class element...it has only the attributes and references and etc., that I have defined in profile...
Maybe I am doing something wrong, but I am kind a loosing my patience here...
Can someone provide example of making transformation between two models of UML profiles defined in Eclipse?
|
|
|
|
|
|
|
|
|
|
Re: Transformation between UML profiles [message #551950 is a reply to message #548002] |
Tue, 10 August 2010 05:25   |
Eclipse User |
|
|
|
So, I managed to generate, through qvto transformation, some UML elements in output model based on elements in input model. I managed to apply profile to output model by using next piece of code:
var models = umlIn.rootObjects()[uml::Model].clone();
models[uml::Model]->forEach(m){
m.profileApplication := profileIn.objects()[uml::ProfileApplication];
};
I tried to use "someClass.applyStereotype()" in transformation, in order to apply some stereotypes to certain elements, but I can not get it working. I can, however apply stereotypes to elements of output model, after transformation, using UML editor, so I guess output model is valid, and profile has been successfully applied upon transformation completition.
Please, can anyone provide valid piece of code for applying stereotypes in qvto transformation!?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09728 seconds