thisModule.resolveTemp() returns OclUndefined [message #1577060] |
Wed, 21 January 2015 17:43 |
Alexander R Messages: 211 Registered: July 2013 |
Senior Member |
|
|
Hello,
I'm playing around with the ATL-Framework and came across the following strange behavior:
resolveTemp(var, target_pattern_name) should return an targetelement to a corresponding sourceelement, by accessing the current trace.
But it only returns an OclUndefined and I really don't know why.
To demonstrate this, I created an example ATL-project with the following transformation:
-- @path TRIANGLE=/Z_ATL_TEST/mm/Triangle.ecore
-- @path CIRCLE=/Z_ATL_TEST/mm/Circle.ecore
module transfo;
create OUT: TRIANGLE from IN: CIRCLE;
rule mod2mod {
from
s: CIRCLE!CircleModel
to
t: TRIANGLE!Model (
name <- s.name,
triangles <- s.circles
)
}
rule circ2triang {
from
s: CIRCLE!Cirlce
to
t: TRIANGLE!Triangle (
color <- s.color
)
do {
thisModule.println(thisModule.resolveTemp(s.refImmediateComposite(), 'model'));
}
}
helper def: println(enu: OclAny): OclAny =
enu.debug();
But the enu.debug() prints only OclUndefined, why is this so? What am I doing wrong?
Any suggestions welcome!
~Alex
[Updated on: Wed, 21 January 2015 17:44] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03017 seconds