How two generate root node an children inside also as root node

Hi all,

in my model i have my root concept called Window, and inside the Window are two Forms. Now the question is: how can i generate 3 Java files out of that ...

Window myWindow:
  Form: myForm1
  Form: myForm2

and i need: (which containes a reference to myForm1 and myForm2, e.g. two instances)

I can not use abandon root node in generator, because i need the root node too...

So what i need is kind of a ReferenceMacro at the place, where the Forms were in the inputModel. But how do i get generated?

Any ideas?
I m not sure,

but i think i found the solution myself. It s quite simple. Just write two root mapping rules.... and reference them where needed?

root mapping rules are kind of independent from reduction rules ..

Hello Dan,
I've got a similar problem. Could you please tell me how you have referenced root mapping rules? They do not have a name, so I can't imagine how you get this work.
Hi Fabma,

ok, the root mapping rules do not have a name - they will be executed automatically when you run the gen and the input node suits.

but you can add reduction rules for same nodes - so you can reference you generated stuff from within a reduction rule.

in my case: the root mapping rule creates the

and the reduction rule creates a: new myForm1() Expression


Please sign in to leave a comment.