|Xtext 2.14 - programmatic EMF model manipulation with minimal re-indexing [message #1838993]
||Thu, 11 March 2021 06:24
| Claudiu Vasilescu
Registered: March 2021
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!
Powered by FUDForum
. Page generated in 0.01858 seconds