Multiple file extensions (diagram types) with the same GlspVscodeConnector #1661
|
Hey there, Is this possible? Unsure if maybe I'm doing something wrong Following #1167, I set up our diagram server similarly with a separate module for each diagram type registered against the same server module. On the client side I created a single diagram server (SocketGlspVscodeServer) and vscode connector. Then I created an editor provider for each diagram type (passing the same vscode connector to both) and register that with vscode. This worked initially with the diagrams loading and actions being performed correctly however I'm running into a weird error when the handleSetDirtyStateAction (onDidChangeCustomDocumentEventEmitter) is triggered. It throws a "No Custom Document found" error, however undo/redo work fine and the documents dirty state seems to be working fine. If I remove the editor provider for one of the diagrams, the error goes away. Cheers |
Replies: 2 comments 3 replies
|
@jmenzies12 Thanks for raising this issue. I looked into this, and the problem is that the We need to filter the event properly down so that it only fires for documents of the provider itself. I will create an issue for that. |
|
Should be fixed with |
@jmenzies12 Thanks for raising this issue.
I looked into this, and the problem is that the
onDidChangeCustomDocumentevent from the connector fires on each changed document. Currently the editor provider just reuses this event as is. As a consequence theonDidChangeCustomDocumentevent for the editor provider might fire if a document was changed that has not been provided by this provider.We need to filter the event properly down so that it only fires for documents of the provider itself.
I will create an issue for that.