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
For both editors ( CustomTextEditor, CustomEditor ) , the SAVE_AS command doesn’t work when
running in Theia (neither when called from the menu, nor by Ctrl-Shift-S).
The SAVE command works absolutely correctly.
Thus, the method saveCustomDocumentAs(..), which is implemented in
class PawDrawEditorProvider implements vscode.CustomEditorProvider<..>,
is never called.
Operating System: Windows 10, Fedora 41
Theia Version: 1.58.100, 1.57.100
The text was updated successfully, but these errors were encountered:
Bug Description:
Standard MS sample for Custom Editor API
https://github.com/microsoft/vscode-extension-samples/tree/main/custom-editor-sample
For both editors ( CustomTextEditor, CustomEditor ) , the SAVE_AS command doesn’t work when
running in Theia (neither when called from the menu, nor by Ctrl-Shift-S).
The SAVE command works absolutely correctly.
In VS code, both commands work fine.
Steps to Reproduce:
Additional Information
As far as I could figure out, the reason is here :
the MS sample implements methods from the interface CustomEditorProvider
saveCustomDocument(..)
saveCustomDocumentAs(..)
But in Theia, in FilesystemSaveableService does not use the method saveCustomDocumentAs(..).
Instead, when executing the SAVE_AS command, calls to the
widget.saveable.createSnapshot or
widget.saveable.serialize
methods are used.
See the implementation of the methods
FilesystemSaveableService : canSaveAs(..)
FilesystemSaveableService : saveSnapshot(..)
Thus, the method saveCustomDocumentAs(..), which is implemented in
class PawDrawEditorProvider implements vscode.CustomEditorProvider<..>,
is never called.
The text was updated successfully, but these errors were encountered: