Add scope to "imported" documents #979
-
I'm working in a solution with multiple languages one that defines a model and the other that builds on top of multiple instances of that model. But different instances of the base model might have the same id for the same entity, is there any way to scope that in the model that uses the base? Let me try to give an example. Let's say we have a model for citizens of countries:
And then I can have multiple countries: Brazil.country
Portugal.country
And then I have a model for a football team:
Where I want to declare a team like this:
If I have all these files in the same folder and load all of them in the language server, how can I be specific to which I almost want the import feature from typescript that I can name a import and references objects inside of it, is it possible? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @luiz290788, you would need some sort of import mechanism for that. We actually use that in our own grammar-scope. You need to restrict what you import from the global scope by looking at the URIs of the |
Beta Was this translation helpful? Give feedback.
Hey @luiz290788,
you would need some sort of import mechanism for that. We actually use that in our own grammar-scope. You need to restrict what you import from the global scope by looking at the URIs of the
AstNodeDescriptions
.