kieler / klighd-vscode

Eclipse Public License 2.0
8 stars 6 forks source link

klighd-vscode: add dispatch-action command for other extensions #15

Closed christoph-fricke closed 2 years ago

christoph-fricke commented 2 years ago

This PR adds a new command to the klighd-vscode extension that allows other extensions to dispatch an Sprotty action in all open webviews that belong to the host extension.

Usage (documented in the README as well):

// - refId: your registration id returned from the setLanguageClient command
// - action: a valid Sprotty action that is send to open diagram views.
vscode.commands.executeCommand("klighd-vscode.dispatchAction", refId: string, action: Action);