Closed FabianMarcoBauer closed 4 years ago
Hi Fabian,
thanks for pinging me.
I haven't tried out your project yet but I'll get to it.
In the mean time... This might be caused by how you manipulate your model. In general it is a good idea to add created objects to a resource as soon as possible after they are created. If possible before they are further manipulated in any way.
Can you check if that helps?
Cheers, Tony
Hello Tony,
this was indeed the source of the exception. The code generate by eMoflon-tie-gt first created the object, modifyed its attributes and references and only then added the object to the resource. If I change the generated code to first add the new object to the resource, the exception does not occur.
It looks like the delayed adding of the new object is only done for LinkToLinkEmbeddings. In all other cases where a new object is created, it is first added to the resource and modified later.
Best regards, Fabian
Ok - perfect! Can you fix this in tie-gt? I'm afraid I'm not the right person for this.
BTW: The explanation for the exception is that events might get lost if created objects are not in the model containment hierarchy.
@Arikae Perhaps you know who to assign this to? Who is maintaining tie-gt?
Closing this since tie-gt is no longer maintained and HiPE fixes these issues
I am using emoflon-ibex-democles to subscribe to appearing and disappearing matches for some patterns. After some calculations with theses matches, I am executing graph transformations implemented with emoflon-tie-gt to modify the model. During one of the modifications, while collecting notifications, a RuntimeException is thrown:
I was able to find this issue: https://github.com/eMoflon/emoflon-ibex/issues/104#issuecomment-283487114 , where the exception also occured. The problem there seems to be related to containment edges. LinkToServerImpl.setVirtual however does not modify containment edges.
Here is the metamodel I am using: Projects.zip . SimpleModelTransformer/src/simpleModelTransformer/EmoflonPatternMatcher contains a main method which causes the exception to be thrown when started.