Hi,
I would like to use rule-nesting, just like it's used in Ecore2Rdb
example.
I have really basic ecore models.
My source ecore model "left.ecore" contains a main class called
"Left", which can contain 0 or more classes named "LeftChild".
My target ecore model "right.ecore" contains a main class called
"Right", which can contain 0 or more classes named "RightChild".
In my Henshin diagram, I can design the transformation of "Left" to
"Right" (using Trace model), which works fine.
For the transformation of "LeftChild" to "RightChild", I'm trying to
use rule-nesting :
In the same rule, I can add the following classes:
- "preserve*/children" :LeftChild
- "create*/children" :Trace
- "create*/children" :RightChild

But when it comes to adding edges, I can not connect "Right" to
"RightChild".
If I change the annotation to "create", I can create the edge.
Then I change the annotation back to "create*/children", but I get a
NullPointerException at runtime.
The only way to make it work is to create another rule where my
"Right" class is already created ("preserve" annotation).
Could you help me to find out what I'm missing to make it work ?
Regards,
Sebastien
|