Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Force reparsing of an Xtext resource possible?
Force reparsing of an Xtext resource possible? [message #1230910] Mon, 13 January 2014 11:09
Jens Rabe is currently offline Jens RabeFriend
Messages: 81
Registered: September 2013
Member
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?
Previous Topic:[XBase] XBaseScopeProvider and declarative scoping
Next Topic:[MWE] EcoreGenerator @generated NOT
Goto Forum:
  


Current Time: Mon Aug 03 18:30:57 GMT 2020

Powered by FUDForum. Page generated in 0.01918 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top