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

Add an API that fires after all documents are saved as part of a Save All action #42913

Closed
DanTup opened this issue Feb 4, 2018 · 1 comment
Assignees
Labels
api feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code

Comments

@DanTup
Copy link
Contributor

DanTup commented Feb 4, 2018

I have some functionality in Dart Code that reloads on-save. Currently I use onDidSaveTextDocument but this fires multiple times if you use Save All so I have to de-bounce it to fire my reload only once. While this works, it introduces an artificial delay and is also a bit of a race - depending on the timing of saving it may still fire multiple times (finding a value that works perfectly is impossible).

It would be great if there was something like a vs.workspace.onDidSaveTestDocuments that fired after all saves are complete from a single operation (whether it be save all or an individual save that only affected one file, including when saves are a result of hitting F5).

@bpasero bpasero assigned jrieken and unassigned bpasero Feb 4, 2018
@jrieken jrieken added feature-request Request for new features or functionality api labels Feb 26, 2018
@jrieken jrieken closed this as completed Oct 8, 2019
@jrieken jrieken added the *out-of-scope Posted issue is not in scope of VS Code label Oct 8, 2019
@jrieken
Copy link
Member

jrieken commented Oct 8, 2019

The easiest workaround is to listen on onDidSave and to iterator over all document and to check the dirty state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code
Projects
None yet
Development

No branches or pull requests

3 participants