Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] resoveTemp and eopposite
[ATL] resoveTemp and eopposite [message #656352] Fri, 25 February 2011 09:23 Go to next message
Fa Za is currently offline Fa ZaFriend
Messages: 245
Registered: March 2010
Senior Member
Hi All, I 'd know if I can use the resolveTemp although I don't have an eopposite relation between my references ?

thanks
Re: [ATL] resoveTemp and eopposite [message #656414 is a reply to message #656352] Fri, 25 February 2011 13:56 Go to previous message
Cedric Gava is currently offline Cedric GavaFriend
Messages: 53
Registered: July 2009
Member
Faiez avait soumis l'idée :
> Hi All, I 'd know if I can use the resolveTemp although I don't have an
> eopposite relation between my references ?
>
> thanks

Hi
I think resolveTemp has nothing to do with your question...


Where resolveTemp is used, is this case, for example :

Imagine the trivial transfomation that Map every Class to a Class, and
every operation to an operation belonging to the class, with just
adding a'T' after the name..

[Model] -> [ResultModel]
ClassA -> ClassAT
OperationA -> OperationAT
ClassB -> ClassBT
OperationB -> OperationBT

->You make one rule for mapping class 2 class
rule c2c {
from s : UML!Class
to outputClass : UML!Class ( name <- s.name + 'T')
}
->And another rule to map operation 2 operation
rule o2o {
from s : UML!Operation
to t : UML!Operation (
name <- i.name + 'T'
class <- <<This reference to the parent class is the purpose of
ResolveTemp>> )
}

-> But you have a problem to set the class reference of the target
operation because, in ATL, you cannot travel in the target model...
-> No you can't, don't insist, it is forbidden...

The tactic to have a reference to something in the target model is to
say :
what is the source element model (M), which, matched with a certain
rule-and-target (R), have created the reference I want in my target
model ?

In our case, the model (M) is the class of the operation i
And the rule-and-target identifier is outputClass...

If I transform the parent of my operation, I will very probably get the
parent for my transformed operation...

rule o2o {
from s : UML!Operation
to t : UML!Operation (
name <- i.name + 'T'
class <- thisModule.resolveTemp(s.class,'outputClass')
}

Kind Regards



NB : this forum seems slepping at that moment. Are every ATL-users on
holiday at Hawaï ??
Damn, I was not invited !


sooo lonely friends of eclipse on forum
http://www.eclipse.org/donate/images/friendslogo160.jpg
Previous Topic:[ATL] automatic copy of a model
Next Topic:[ATL] content assist with library use
Goto Forum:
  


Current Time: Wed Apr 14 04:44:09 GMT 2021

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

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

Back to the top