Skip to content
New issue

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

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

Already on GitHub? # to your account

Support cancellation on plugin file events #11658

Merged
merged 2 commits into from
Sep 22, 2022

Conversation

msujew
Copy link
Member

@msujew msujew commented Sep 12, 2022

What it does

Closes #11508
Closes #11563

Supersedes the PR above by adapting the approach taken by vscode. vscode always passes the token into the async event, so we don't have to do that ourselves for each event.

Additionally enables to actually cancel the file events using a notification similar to vscode.

Also updates a few missing localizable strings in the file-service.ts file.

How to test

  1. Install the test extension cancellation-token-0.0.1.vsix.
  2. Create a new file in the explorer.
  3. A notification should appear that a file is in progress of being created (both from Theia and from the extension)
  4. Cancelling the operation explicitly or by waiting (5 seconds by default) will cancel the token and another notification will appear that the operation has been cancelled. The file will then be successfully created.

Review checklist

Reminder for reviewers

@msujew msujew added filesystem issues related to the filesystem vscode issues related to VSCode compatibility labels Sep 12, 2022
Copy link
Member

@vince-fugnitto vince-fugnitto 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 the changes look good, and work as expected 👍

@msujew msujew merged commit cd2f081 into master Sep 22, 2022
@msujew msujew deleted the msujew/file-event-cancellation branch September 22, 2022 12:48
@github-actions github-actions bot added this to the 1.30.0 milestone Sep 22, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
filesystem issues related to the filesystem vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[vscode] Support CancellationToken in file events
2 participants