Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Model-to-Model Transformation » Apply a profile to UML model
Apply a profile to UML model [message #890121] Thu, 21 June 2012 08:09 Go to next message
Mauro Faella is currently offline Mauro FaellaFriend
Messages: 31
Registered: June 2012
Member
Hi,
I would automatically apply the UML Testing Profile to an UML model.


What is the best way and the best tool (I'm trying with ATL with few results) to do it, based on your experience?
Re: Apply a profile to UML model [message #890132 is a reply to message #890121] Thu, 21 June 2012 08:46 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The MDT/UML2 project is the home of all these algorithms.

The UML Model Editor (with UML Examples installed) provides an
interactive interface to the algorithms.

When I want the same thing automated I search/debug to see how the UML
Model Editor does it and usually find a utility.

A good tip when working with any code base is to search out all *Util*
classes. You may find good re-useable things (e.g. EcoreUtil, UMLUtil).

Regards

Ed Willink


On 21/06/2012 09:09, Mauro Faella wrote:
> Hi,
> I would automatically apply the UML Testing Profile to an UML model.
>
>
> What is the best way and the best tool (I'm trying with ATL with few
> results) to do it, based on your experience?
Re: Apply a profile to UML model [message #890141 is a reply to message #890121] Thu, 21 June 2012 09:12 Go to previous messageGo to next message
Federico Toledo is currently offline Federico ToledoFriend
Messages: 97
Registered: April 2012
Location: Ciudad Real, Spain
Member
I am using QVT to do it ... I had few results in my little experience with ATL.

I am writing some of my problems and solutions in a blog

http //tambienvineaestudiar wordpress com/2012/05/10/como-aplicar-un-uml-profile-con-qvt/

it is in spanish... if you have any particular question related with what I've tried, just let me know
Re: Apply a profile to UML model [message #890148 is a reply to message #890141] Thu, 21 June 2012 09:37 Go to previous messageGo to next message
Mauro Faella is currently offline Mauro FaellaFriend
Messages: 31
Registered: June 2012
Member
Thank you both.
I prefer not to use the API for now, also if I think that it is the best way to do what I want...

@Federico could you say me if you used QVT Operational plugin of Eclipse or something else?
Re: Apply a profile to UML model [message #890150 is a reply to message #890148] Thu, 21 June 2012 09:43 Go to previous messageGo to next message
Federico Toledo is currently offline Federico ToledoFriend
Messages: 97
Registered: April 2012
Location: Ciudad Real, Spain
Member
actually, I am using MediniQVT
Re: Apply a profile to UML model [message #890420 is a reply to message #890150] Fri, 22 June 2012 09:13 Go to previous messageGo to next message
Mauro Faella is currently offline Mauro FaellaFriend
Messages: 31
Registered: June 2012
Member
Hi Federico, I'm trying your script but the output is empty. Moreover the "utp.xmi" that I put in run configuration is erased after the run... I don't understand why. As metamodel I used utp.ecore and uml.ecore that are generated from utp.xmi transformation by emf.
Re: Apply a profile to UML model [message #890428 is a reply to message #890420] Fri, 22 June 2012 09:23 Go to previous messageGo to next message
Federico Toledo is currently offline Federico ToledoFriend
Messages: 97
Registered: April 2012
Location: Ciudad Real, Spain
Member
probably it's a problem with the metamodels.
In my experience, everything get complicated around this (in MediniQVT and in ATL). You have to be sure that the model and the metamodel correspond each other. If you look for a "class" and your model has "class" but with different metamodels, you can have an empty transformation.

which script are you trying?
and check in the blog that I've explained which metamodels I'm using, and also, I changed some things in the metamodels manually, because I had problems with that... to apply stereotypes you need to reference the Eclipse UML metamodel, so .. the ecore files generated by EMF didnt work (at least in my tries)

Re: Apply a profile to UML model [message #890448 is a reply to message #890428] Fri, 22 June 2012 10:22 Go to previous messageGo to next message
Mauro Faella is currently offline Mauro FaellaFriend
Messages: 31
Registered: June 2012
Member
Yes, I think that you are right about the metamodels.
I'm trying the script in-here: hxxp:://tambienvineaestudiar wordpress com/2012/05/10/como-aplicar-un-uml-profile-con-qvt/
I add the transformation statement with three input of type uml. As uml metamodel I tried the three version given by Eclipse.
The problem that I'm having now is that it doesn't recognize uml::Class as a uml::Classifier in class2datapool:
enforce domain target dp:utp::DataPool{
     base_Classifier = dp_class
};

About OMG UTP.xmi I've done the same your things.
Re: Apply a profile to UML model [message #890452 is a reply to message #890448] Fri, 22 June 2012 10:28 Go to previous messageGo to next message
Federico Toledo is currently offline Federico ToledoFriend
Messages: 97
Registered: April 2012
Location: Ciudad Real, Spain
Member
for me the key for this kind of problems (I also faced these problems) is here:

http //tambienvineaestudiar.wordpress com/2012/05/15/referenciar-uml-registrado-en-eclipse-evitar-uml-ecore/

hope it helps
Re: Apply a profile to UML model [message #891713 is a reply to message #890452] Mon, 25 June 2012 15:14 Go to previous messageGo to next message
Mauro Faella is currently offline Mauro FaellaFriend
Messages: 31
Registered: June 2012
Member
Federico Toledo wrote on Fri, 22 June 2012 06:28
for me the key for this kind of problems (I also faced these problems) is here:

http //tambienvineaestudiar.wordpress com/2012/05/15/referenciar-uml-registrado-en-eclipse-evitar-uml-ecore/

hope it helps

It helped me, thanks Federico.

Now I've the visualization problem of the first link and I don't understand very well what you have done to visualize in the right way the target uml model. If you had a minute to explain it, I appreciate it very much...

[Updated on: Mon, 25 June 2012 15:16]

Report message to a moderator

Re: Apply a profile to UML model [message #891715 is a reply to message #891713] Mon, 25 June 2012 15:25 Go to previous messageGo to next message
Federico Toledo is currently offline Federico ToledoFriend
Messages: 97
Registered: April 2012
Location: Ciudad Real, Spain
Member
I've edited the uml file with a text editor, replacing:

"uml.ecore"

by

"http//www.eclipse.org/uml2/3.0.0/UML"
Re: Apply a profile to UML model [message #891717 is a reply to message #891715] Mon, 25 June 2012 15:26 Go to previous messageGo to next message
Federico Toledo is currently offline Federico ToledoFriend
Messages: 97
Registered: April 2012
Location: Ciudad Real, Spain
Member
you have to add ":" in the last url (sorry, I need to post a couple of messages more in order to be allowed to publish URLs)
tell me if it works
Re: Apply a profile to UML model [message #893086 is a reply to message #891717] Mon, 02 July 2012 14:40 Go to previous messageGo to next message
Mauro Faella is currently offline Mauro FaellaFriend
Messages: 31
Registered: June 2012
Member
Hi,
I'm here again Razz
I'm trying to do the same Federico's things but I fail somewhere...
Summing up... I'm doing these steps:


  1. change the string "hxxp://www.omg.org/spec/UML/20090901" with "hxxp://schema.omg.org/spec/UML/2.2"
  2. transform the utp.xmi from OMG in ecore by EMF
  3. use Federico's qvt script from "hxxp://tambienvineaestudiar.wordpress.com/2012/05/10/como-aplicar-un-uml-profile-con-qvt/"
  4. get various errors:

    • if I use utp.xmi instead of utp.uml (same source) after the script execution the file become empty
    • the qvt compiler gets me this Problem: "when clause of relation 'class2datapool' could not be resolved (variable 'm' is not assigned)!"



Any suggestion is appreciated very much Razz
Re: Apply a profile to UML model [message #893426 is a reply to message #893086] Wed, 04 July 2012 06:34 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

It seems Federico isn't going to help.

I responded to your original question and identified the UML tooling
available. ATL or any other transformation engine is unnecessary, so I'm
unclear why you're pursuing it.

If you still have an Eclipse problem rather than a MediniQVT problem,
please raise it in a way that someone might actually be able to help.

Regards

Ed Willink


On 02/07/2012 15:40, Mauro Faella wrote:
> Hi,
> I'm here again :p
> I'm trying to do the same Federico's things but I fail somewhere...
> Summing up... I'm doing these steps:
>
>
> change the string "hxxp://www.omg.org/spec/UML/20090901" with
> "hxxp://schema.omg.org/spec/UML/2.2"
> transform the utp.xmi from OMG in ecore by EMF
> use Federico's qvt script from
> "hxxp://tambienvineaestudiar.wordpress.com/2012/05/10/como-aplicar-un-uml-profile-con-qvt/"
> get various errors:
>
> if I use utp.xmi instead of utp.uml (same source) after the script
> execution the file become empty
> the qvt compiler gets me this Problem: "when clause of relation
> 'class2datapool' could not be resolved (variable 'm' is not assigned)!"
>
>
>
> Any suggestion is appreciated very much :p
Re: Apply a profile to UML model [message #893427 is a reply to message #893086] Wed, 04 July 2012 06:52 Go to previous message
Federico Toledo is currently offline Federico ToledoFriend
Messages: 97
Registered: April 2012
Location: Ciudad Real, Spain
Member
sorry, I was trying and I faced similar problems, and I am trying to identify and solve that problems. I dont know why utp.uml gets modified ....
Previous Topic:what about the messages in the list e.m.m2m
Next Topic:M2M for genmodel
Goto Forum:
  


Current Time: Fri Mar 29 02:27:02 GMT 2024

Powered by FUDForum. Page generated in 0.04867 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top