Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix programmatic save for custom text editors #13684

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

msujew
Copy link
Member

@msujew msujew commented May 5, 2024

What it does

Closes #9230

Instead of using the EditorManager (that seemingly doesn't keep track of CustomEditorWidget instances), we simply use the monaco model service to save the underlying model.

Also removes an unused RPC method $tryCloseDocument.

How to test

Follow the instructions in #9230 and confirm that manual saving works as expected. Alternatively, the extension in #12979 should now also work as expected.

Review checklist

Reminder for reviewers

@msujew msujew added vscode issues related to VSCode compatibility custom-editor issues related to custom-editor functionality labels May 5, 2024
@msujew msujew changed the title Fix programmatic save for custom editors Fix programmatic save for custom text editors May 5, 2024
@msujew msujew force-pushed the msujew/fix-custom-editor-saving branch from b4f39c4 to 7a115fb Compare May 11, 2024 10:52
@tsmaeder tsmaeder requested a review from jonah-iden May 22, 2024 09:37
Copy link
Contributor

@jonah-iden jonah-iden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work great great.
Tested with Draw.io, BPMN editor, notebooks, text editors

@msujew msujew merged commit 63fb7e9 into master Jun 14, 2024
14 checks passed
@msujew msujew deleted the msujew/fix-custom-editor-saving branch June 14, 2024 16:41
@github-actions github-actions bot added this to the 1.51.0 milestone Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
custom-editor issues related to custom-editor functionality vscode issues related to VSCode compatibility
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

CustomEditorProvider Cannot Saved file through function "document.save()"
2 participants