Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] Problem with rule-nesting

Hi Sebastien,

I hope we can fix the editor bug soon. Regarding your NPE at runtime, we need a stack trace and ideally your example.

Cheers,
Christian


2015-01-23 17:09 GMT+01:00 Sébastien Pasero <sebastien.pasero@xxxxxx>:
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

_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/henshin-dev


Back to the top