Bidirectional imports [message #1742679] |
Tue, 06 September 2016 15:22 |
Martin Westerkamp Messages: 9 Registered: September 2016 |
Junior Member |
|
|
Hey everyone,
I have developed two DSLs, let's call them A and B. They work quite independently, however, there are supposed to be some cross references from one language to the other as well.
In the beginning of development there have only been cross references in one direction, so A imported B and referenced some of its elemets. That construct worked without any issues. However, when I tried to do the same the other way around, so that B imported A as well, I would get several errors related to initialization when starting the language's Eclipse instance.
Here an extract of the log:
Caused by: java.lang.NullPointerException
at com.lang.controller.controller.impl.ControllerPackageImpl.init(ControllerPackageImpl.java:1297)
at com.lang.controller.controller.ControllerPackage.<clinit>(ControllerPackage.java:59)
... 196 more
Root exception:
java.lang.ExceptionInInitializerError
at com.lang.autogen.autogen.impl.AutogenPackageImpl.init(AutogenPackageImpl.java:83)
at com.lang.autogen.autogen.AutogenPackage.<clinit>(AutogenPackage.java:58)
Is there any way to allow imports in both directions? I have also tried to outsource the relevant parts to a third language, but obviously that resulted in a cycle, so that the same problem occurred. I can see that such cycles aren't desirable, but I cannot think of any other way allowing cross references bidirectionally. Does anyone have an idea?
Greets
Martin
|
|
|
|
Powered by
FUDForum. Page generated in 0.04096 seconds