-
Thank you for the nice documentation (https://langium.org/docs/). I really appreciated the very clear description of the document lifecycle!
I created a scope provider which creates elements of type
I am concerned about the reference to the document: I only link my reference to one document ( |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
Hey @goto40, You're just trying to reference a single element using it's fully qualified name, right? Your approach is a bit unconventional/overengineered, since what you're trying to do can be relatively easily accomplished using the scoping in our domain-model example. Although your fully qualified name is a chain of elements, it actually only references a single element which is at the end of the chain. That's exactly what the domain-model scoping does. Note that your approach using synthetic AST nodes also breaks a lot of LSP behavior, notably the go to definition and find references feature. |
Beta Was this translation helpful? Give feedback.
Hey @goto40,
You're just trying to reference a single element using it's fully qualified name, right? Your approach is a bit unconventional/overengineered, since what you're trying to do can be relatively easily accomplished using the scoping in our domain-model example. Although your fully qualified name is a chain of elements, it actually only references a single element which is at the end of the chain. That's exactly what the domain-model scoping does.
Note that your approach using synthetic AST nodes also breaks a lot of LSP behavior, notably the go to definition and find references feature.