Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL]
[ATL] [message #534580] Wed, 19 May 2010 11:17 Go to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui Mahmoud
Messages: 248
Registered: March 2010
Senior Member


Hi,

Please i have a problem to transform the element type in my MM, the rule look like :

rule attribute {
.......
name <- this.name,
type<-this.type.debug('type')
......
}

when i llok into the debug the elemnt is loaded but there is no binding so i solve the problem by using

do{
out.eSet(out.eClass().getEStructuralFeature('type'),
f.type);
}

any ideas on wwhy i got the problem?

mahmoud
Re: [ATL] [message #534583 is a reply to message #534580] Wed, 19 May 2010 11:26 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARD
Messages: 511
Registered: July 2009
Senior Member
In the binding you're binding this.type and in the do section you're using f.type ?
Re: [ATL] [message #534597 is a reply to message #534583] Wed, 19 May 2010 11:47 Go to previous messageGo to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui Mahmoud
Messages: 248
Registered: March 2010
Senior Member

Hi, Soory, but this is my hole rule :





Quote:

rule attribute {
from o : MM1l!Operation
to out : MMUML2!Operation (
name<-o.name,
visibility <- o.visibility,
)
do {
out.eSet(out.eClass().getEStructuralFeature('type'),
o.type);



and before i had this : type <- o.type

thanks
mahmoud
Re: [ATL] [message #534608 is a reply to message #534580] Wed, 19 May 2010 11:58 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARD
Messages: 511
Registered: July 2009
Senior Member
type is a EReference ?
Re: [ATL] [message #534613 is a reply to message #534608] Wed, 19 May 2010 12:07 Go to previous messageGo to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui Mahmoud
Messages: 248
Registered: March 2010
Senior Member


Hi Sylvain,

Yes type is EReference.

thanks
mahmoud
Re: [ATL] [message #534614 is a reply to message #534580] Wed, 19 May 2010 12:08 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARD
Messages: 511
Registered: July 2009
Senior Member
and how are the elements referenced transformed ?
Re: [ATL] [message #534622 is a reply to message #534614] Wed, 19 May 2010 12:17 Go to previous message
Elhamlaoui Mahmoud is currently offline Elhamlaoui Mahmoud
Messages: 248
Registered: March 2010
Senior Member


Hi,

I got the idea normallay by using an other transformation to transform from type to another stuff, but i forget this

type <- o.type.getCorrespondingDataType() //a helper that return a type

mahmoud
Previous Topic:[QVTo] Problems using the "resolve/resolveone" command - tracking objects
Next Topic:[QVTO] simple mapping constructs
Goto Forum:
  


Current Time: Wed Apr 16 03:33:42 EDT 2014

Powered by FUDForum. Page generated in 0.01684 seconds