|Force reparsing of an Xtext resource possible? [message #1230910]
||Mon, 13 January 2014 11:09
| Jens Rabe
Registered: September 2013
My problem is the following:|
I have an Object A which has a containment reference to a B, and the B references an external C. I now edit A (and B) in a custom GUI-based editor which uses EMF Edit. The referenced C's are shown in the editor and affect the validation of the A and B.
Now, I modify the B in another context (e.g. a text-based Xtext editor, or via applying a Quickfix to the B), and the modification incorporates adding a C to the B (myB.getC().add(newC)).
I now track this modification in my custom editor input for my EMF Edit based editor, and use EMF compare to copy the changes from the disk back to my object. I must use this approach because the EMF Edit based editor heavily uses JFace Databinding and the object coming from the editor input has thus a lot of adapters attached I have no control of. Simply reloading the entire object would destroy my databinding setup.
But when copying the changes back from the disk to my object in memory, I get the following exception:
[main] ERROR xt.linking.lazy.LazyLinkingResource - resolution of uriFragment 'xtextLink_::0.2.2::2::/21' failed.
This is because the Xtext resource still has the old parse result. How can I force a full reparse of the resource (or determine the portion which was changed and reparse this only) without unloading any EObjects?
Powered by FUDForum
. Page generated in 0.02024 seconds