Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext 2.14 - programmatic EMF model manipulation with minimal re-indexing(Xtext 2.14 - programmatic EMF model manipulation with minimal re-indexing)
Xtext 2.14 - programmatic EMF model manipulation with minimal re-indexing [message #1838993] Thu, 11 March 2021 06:24 Go to next message
Claudiu Vasilescu is currently offline Claudiu VasilescuFriend
Messages: 1
Registered: March 2021
Junior Member
Hi everyone,

Would it be technically possible, and advisable, to edit the EMF model after the indexing and linking phase without triggering a re-indexing of the entire model and to avoid the reloading of the files describing the model and overwriting the programmatic changes made on it?

The scenario would be to programmatically remove broken cross references that I am certain are not needed without editing the actual model described by the files loaded from the hard drive and somehow bypass any change event that might be triggered that will result in reloading the model from the input files (autoload/build automatically being deactivated, otherwise I am most certain the files will be reloaded).

The step by step approach I was thinking of for achieving this would be:
- Load grammar and model files, index, link.
- After the linking phase analyze the linker markers, identify broken references that can be ignored and remove them from the model (let's say all broken references will be ignored, so it's easier).
- Somehow refresh/update the index and re-link(ideally as fast as possible) and continue with the validation and generation steps with a clean model.

Do you think this would be achievable with Xtext 2.14, if so do you have some hints on how to accomplish it?

Thanks a lot!
Re: Xtext 2.14 - programmatic EMF model manipulation with minimal re-indexing [message #1839381 is a reply to message #1838993] Fri, 19 March 2021 15:55 Go to previous message
Mokhtar Al-Shubei is currently offline Mokhtar Al-ShubeiFriend
Messages: 1
Registered: March 2021
Junior Member
Hello Claudiu,

I would discourage this proposal of you to remove the unwanted cross-references. I would again encourage to revisit these two options
DefaultLinkingService see https://www.eclipse.org/forums/index.php/t/1024478/

or by introducing a custom impl of IDerivedStateComputer.
https://www.eclipse.org/forums/index.php/t/468114/

Now both don't give you the complete solution for your use case but I think these are where to dig into.

Hope that help!
Regards
Mokhtar

Previous Topic:Parser ambiguity
Next Topic:How to get xtext comment information?
Goto Forum:
  


Current Time: Sun Jun 20 12:23:10 GMT 2021

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

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

Back to the top