Handling of Undo in Theia vs VSCode - VSCode Extensions #14876
Unanswered
jmenzies12
asked this question in
Q&A
Replies: 1 comment
-
Hey @jmenzies12,
We generally try to replicate the extension behavior of VS Code as much as possible. Therefore, the best way to handle this would be to create a fix for this. Unfortunately, the plugin code is very much locked down so it's difficult to work around this from an adopter application. That's why a fix in the framework is likely required. Do you mind creating an issue for this? Ideally with a reproducible example so that we can verify both the current and the fixed behavior. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
We are currently developing a VSCode extension that we plan on providing as a standalone as well as packaged with Theia Browser.
Our application provides a Langium DSL as well as GLSP diagram with both editors working on the same file. To make changes to the DSL from GLSP we use language server code actions.
Unfortunately we ran into an issue with undo when running the extension in Theia. In VSCode when you undo a code action from the GLSP editor, it updates the DSL as well as any GLSP specific changes (ie node positioning etc). Attempting to undo the same action in Theia from the GLSP editor, does not trigger the change to be undone from the DSL, it only triggers the GLSP side.
Having looked into this, I noticed that if I register the GLSP editor as a CustomTextEditorProvider instead of CustomEditorProvider then this would trigger the undo change in the DSL as it gets sent to the Monaco Editor. However this then removes any undo capability on the GLSP side.
If anyone has any insight/suggestions on how best to handle this, that would be very much appreciated.
Kind Regards
Jonathan
Beta Was this translation helpful? Give feedback.
All reactions