blended-modeling / eatxt

Eclipse Public License 2.0
1 stars 1 forks source link

Allow cross-references to EAXML files #24

Closed steghoja closed 2 years ago

steghoja commented 2 years ago

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 in eaxml files to ensure that we can use blended modelling as intended.

Wilson008 commented 2 years ago

Here is an example may be useful: https://blogs.itemis.com/en/combining-emf-models-with-xtext-dsls

Wilson008 commented 2 years ago

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

steghoja commented 2 years ago

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?

steghoja commented 2 years ago

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.

steghoja commented 2 years ago

I am closing this as it works for now.