Currently, only at most one extension that depends on kieler.klighd-vscode can be activated at the same time. This causes problems if a workspace opens multiple files that are handled by different KLighD dependent extensions.
Workaround
The current workaround is to close all files handled by one extension, reload the workspace and only open the files handled by another extension to visualize them.
How to fix this
Currently, sprotty-vscode registers diagram commands in the KLighDExtension class. An instance of this class is created for every activated, dependent extension. However a command can only be registered at most once. Multiple registrations cause an error.
The command registration has to be lifted out of the KLighDExtension class while ensuring that they are still able to open diagrams and dispatch actions to their webview.
Extra precautions and investigations have to be made to ensure that multiple instances of KLighDExtension do not interfere with the webview management of sprotty-vscode. Ideally they all use the same webview. At the same time, messages from the webview have to be routed to the correct language client.
This might not be possible with sprotty-vscode. A solution might have to reimplement the gluecode to solve this issue.
Currently, only at most one extension that depends on
kieler.klighd-vscode
can be activated at the same time. This causes problems if a workspace opens multiple files that are handled by different KLighD dependent extensions.Workaround
The current workaround is to close all files handled by one extension, reload the workspace and only open the files handled by another extension to visualize them.
How to fix this
sprotty-vscode
registers diagram commands in theKLighDExtension
class. An instance of this class is created for every activated, dependent extension. However a command can only be registered at most once. Multiple registrations cause an error.KLighDExtension
class while ensuring that they are still able to open diagrams and dispatch actions to their webview.KLighDExtension
do not interfere with the webview management ofsprotty-vscode
. Ideally they all use the same webview. At the same time, messages from the webview have to be routed to the correct language client.sprotty-vscode
. A solution might have to reimplement the gluecode to solve this issue.