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

Test new workspace event API #85929

Closed
2 tasks done
jrieken opened this issue Dec 2, 2019 · 4 comments
Closed
2 tasks done

Test new workspace event API #85929

jrieken opened this issue Dec 2, 2019 · 4 comments

Comments

@jrieken
Copy link
Member

jrieken commented Dec 2, 2019

Refs: #43768

Complexity: 3

There are new event that fire before and after a file or folder is being created, renamed, and deleted. These events are vscode.workspace.onWillRename, ...onDidRename, ..onWillCreate, ...onDidCreate, ...onWillDelete, and ...onDidDelete. Test

  • these events are fired when performing file operations via the explorer or the vscode.workspace.applyEdit API
  • these events are not fire when performing them "on disk", e.g using the cmd line, another application, or the vscode.workspace.fs API.
  • the will-events allow to register a promise that is awaited before performing the operation
  • this works when deleting, moving many files/folders
  • the jsdoc is easy to understand
@jrieken jrieken added this to the November 2019 milestone Dec 2, 2019
@jrieken
Copy link
Member Author

jrieken commented Dec 2, 2019

fyi - use the vscode-dts-utility to use the latest version of vscode.d.ts and/or vscode.proposed.d.ts

@jrieken
Copy link
Member Author

jrieken commented Dec 3, 2019

fyi - this should be finalised API but the PR didn't make it in time. So, the API is still in proposed but won't change anymore. (In master it's moved to stable)

@dbaeumer
Copy link
Member

dbaeumer commented Dec 3, 2019

Worked nicely for me. I tested under Windows.

@deepak1556
Copy link
Collaborator

Works pretty good on macOS 👍 , identified a couple of edge cases.

@deepak1556 deepak1556 removed their assignment Dec 4, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants