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

editor: add 'revert and close editor' command #9728

Merged
merged 1 commit into from
Jul 14, 2021

Conversation

vince-fugnitto
Copy link
Member

What it does

Fixes: #7575.

The command 'workbench.action.revertAndCloseActiveEditor' was added as part of #7702 but was only available to the plugin-system unlike vscode. The changes update the functionality to allow users to execute the command from the application, while it also working from a vscode plugin.

How to test

  1. include the vscode-revert-and-close test plugin
  2. start the application, ensure that autoSave is off (to properly test revert)
  3. open an editor, and make dirty changes
  4. execute the application command View: Revert and Close Editor - should successfully revert the changes and close the editor
  5. open an editor, and make dirty changes
  6. execute the plugin command Test: Revert and Close Editor - should successfully revert the changes and close the editor

Review checklist

Reminder for reviewers

Signed-off-by: vince-fugnitto vincent.fugnitto@ericsson.com

@vince-fugnitto vince-fugnitto added vscode issues related to VSCode compatibility commands issues related to application commands labels Jul 13, 2021
Copy link
Contributor

@colin-grant-work colin-grant-work left a comment

Choose a reason for hiding this comment

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

I confirm that both internal and external (plugin) invocations of the command are successful, and that in both cases the editor is reverted to its last saved state and then closed.

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

I can confirm that the revert and close editor command is visible to the user and behaves as expected. Code LGTM.

The pull-request moves the `revert and close editor` command out of the
plugin-system so it can be used by end-users as well as for vscode
plugins.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
@vince-fugnitto vince-fugnitto merged commit 8dd8401 into master Jul 14, 2021
@vince-fugnitto vince-fugnitto deleted the vf/revert-and-close branch July 14, 2021 19:15
@github-actions github-actions bot added this to the 1.16.0 milestone Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commands issues related to application commands vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for VSCode Command workbench.action.revertAndCloseActiveEditor
3 participants