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 Christian,

I tried to reproduce the issue, but I got another error instead :
Exception in thread "main" java.lang.NullPointerException
    at org.eclipse.emf.henshin.model.resource.HenshinResourceSet.saveEObject(HenshinResourceSet.java:358)
    at org.eclipse.emf.henshin.model.resource.HenshinResourceSet.saveEObject(HenshinResourceSet.java:346)
    at org.eclipse.example.Left2Right.main(Left2Right.java:37)

Could you help me with this ?

Le 23/01/2015 17:58, Christian Krause a écrit :
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



_______________________________________________
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

--
CS CS BLOG MAILTO


Attachment: Left2Right_src.zip
Description: Zip compressed data


Back to the top