Closed steghoja closed 2 years ago
Here is an example may be useful: https://blogs.itemis.com/en/combining-emf-models-with-xtext-dsls
How to implement the Xtext-XMI cross reference for LSP based editor in Theia? https://stackoverflow.com/questions/66968029/how-to-implement-the-xtext-xmi-cross-reference-for-lsp-based-editor-in-theia
Summary of today's discussion: we need to make sure that we are always loading the in-memory representation (go through the existing resource) to get even transient changes in editors instead of loading from file. Also, we need to resolve conflicts: if an eatxt file was generated for a part of an eaxml file, then which representation has precedence?
I made a number of changes on how the scope is computed in 95280b5. In particular, we are now going via the resource
and we are including all eatxt
and eaxml
files in the workspace (i.e., even those in sub-directories) to use the global scope as discussed with Henrik.
It's still not perfect, though: we are using the ResourceSet
that Xtext injects into the ScopeProvider
. Ideally, we would get the resource sets from the editors in which the files are opened.
I am closing this as it works for now.
With the code that landed for issue #5, we now support cross-references to other
eatxt
files. However, we also need to support cross-references to model elements that are stored ineaxml
files to ensure that we can use blended modelling as intended.