Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Do we have to instantiate ProfileApplication when transforming an extended model into another?
[ATL] Do we have to instantiate ProfileApplication when transforming an extended model into another? [message #642807] Thu, 02 December 2010 18:49 Go to next message
Tomas Balderas is currently offline Tomas BalderasFriend
Messages: 46
Registered: July 2010
Member
I have defined a toy transformation that receives an input model to which I have applied a simple profile (profileA). I used UML Editor to build profileA and then, by using a command, I applied it to the source model; as a result, an instance of the meta-meta-class ProfileApplication appeard on the .uml file of the source model.

The target model generated by my ATL rules generated the instances of the meta-classes Model, Class, and the stereotype defined in a second profile (profileB) properly, I applied the instance of the stereotype to the class properly.

The .uml file for the target model DOES NOT contain an instance of the meta-meta-class ProfileApplication as the .uml file for the source model does. A consequence of this is that profileB cannot be de-applied from the target model. And then comes my questions: is it a rule to generate an instance of the meta-meta-class PofileApplication in a target model? can a target model be useful without it? What is your experience on that?

Kindest regards.


/TB

[Updated on: Thu, 02 December 2010 18:50]

Report message to a moderator

Re: [ATL] Do we have to instantiate ProfileApplication when transforming an extended model into anot [message #642888 is a reply to message #642807] Fri, 03 December 2010 08:36 Go to previous message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 523
Registered: July 2009
Senior Member
Use "applyProfile" on your Model element :

rule Model {
from s : Model
to t : Model()
do{
t.applyProfile(UML2!Profile.allInstances()->select(s | s.name='nameoftheprofile')->first());
}
Previous Topic:[ATL] Question about Called and Unique Lazy Rules
Next Topic:[ATL] : ATL and Maven
Goto Forum:
  


Current Time: Sat Dec 20 08:15:21 GMT 2014

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

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