You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone. I've made a good progress with the DSL language we're designing.
Now I am trying to add support for yet another language, which is also DSL, intended to be used in a combination with the first DSL.
I am not sure what would be a correct architecture here.
So far I've tried to duplicate everything I've got for the first language:
Implemented a new class inherited from the VirtualCode; this class "knows" the parser to use with the code
Added the language detection logic to the LanguagePlugin implementation:
Added the proper branches to the CreateVirtualCode method in my LanguagePlugin implementation
Added the second implementation of the LanguageService (as the language features supported are substantially different), that creates a second implementation of the LanguageServicePlugin.
The issue is that every event gets fired for both Language Service Plugin instances. I.e. getDiagnostics gets called in each of them.
Is there any way to properly route the events, so each language is handled by it's own Language Service?
Is there a better way to handle this configuration?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone. I've made a good progress with the DSL language we're designing.
Now I am trying to add support for yet another language, which is also DSL, intended to be used in a combination with the first DSL.
I am not sure what would be a correct architecture here.
So far I've tried to duplicate everything I've got for the first language:
The issue is that every event gets fired for both Language Service Plugin instances. I.e. getDiagnostics gets called in each of them.
Is there any way to properly route the events, so each language is handled by it's own Language Service?
Is there a better way to handle this configuration?
Beta Was this translation helpful? Give feedback.
All reactions