|xText Builder dependency for namedspace import [message #1017218]
||Mon, 11 March 2013 08:32
Registered: May 2012
I have a question regarding how to handle saving two models with crossreferences using the importedNamespace-mechanism.
We have to two dsl models:
(contains a list of available languages).
(Feature has references to the available languages)
The model works fine with the xText Editors.
We have also a customized EMF-Editor.
The Languages Model and the Feature Models (could be several) are added to the resource set. On doSave is where I get in trouble, if I add a new Language to the languages model and refer from a Feature to it.
The following Exception is thrown:
Could not serialize cross reference from
TextToken.language to Languages.languages->Language'Spanish'
After a lot of debugs, it seems to be related with the xText Builder.
Calling the save of all resources in the same workspacemodifyjob it always fails, although the language resource is saved first. I guess because the builder is called after the job has finished.
I created two workspacemodifyjobs. The first to store the languages model and the second to store the features. Now its a 50% chance. Sometimes the new language could be resolved, sometimes not. This seems to depend if the builder job has finished before the save resource or not.
The only way to get it working, is to join the build by
I am using xText 2.2.1. Is there better way to fix it?
[Updated on: Mon, 11 March 2013 19:04]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01717 seconds