|
|
|
|
|
Re: Testing XText-based interpreter calling out to Henshin [message #1726739 is a reply to message #1726593] |
Tue, 15 March 2016 22:39 |
Steffen Zschaler Messages: 266 Registered: July 2009 |
Senior Member |
|
|
Hi,
I managed to fix it. It turned out I didn't need the specialised text runner. Instead, all I had to do was to add the following line of code to setupRegistry in my test injector provider class:
EPackage.Registry.INSTANCE.put(HenshinPackage.eNS_URI, HenshinPackage.eINSTANCE);
I think, this is a bug in org.eclipse.xtext.junit4.GlobalRegistries: When storing the global state, it doesn't deal correctly with global package registries that are delegate registries: in this case, it only keeps track of what is in the main registry, but not of what is in the delegate registry. In my case, the Henshin meta-model was registered in the delegate registry only, so when restoreGlobalState was called, the registry entry was removed. Should I report this or is this considered a feature and I am just missing an important point?
Many thanks,
Steffen
|
|
|
Powered by
FUDForum. Page generated in 0.05679 seconds