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 onWillSaveTextDocument event #12640

Closed
1 task done
jrieken opened this issue Sep 26, 2016 · 1 comment
Closed
1 task done

Test onWillSaveTextDocument event #12640

jrieken opened this issue Sep 26, 2016 · 1 comment

Comments

@jrieken
Copy link
Member

jrieken commented Sep 26, 2016

Test for #239

Complexity 3

We added a new event onWillSaveTextDocument that fire before a document is saved to disk and that allows you to sneak in changes to the document. Make sure that

  • the event has proper jsdoc and informs about the challenges a pre-save hook brings
  • the event tells you why save happens
  • the event allows to modify the document (register any long running task)
  • the event allows to provide text edits that should be applied before save
  • the event is protected from bad listeners (throw errors async/sync)
  • the event is guarded from slow listeners (never resolve promise)
@jrieken jrieken added this to the September 2016 milestone Sep 26, 2016
@jrieken
Copy link
Member Author

jrieken commented Sep 26, 2016

FYI - to test against the latest API do the following:

  • open your extensions package.json file
  • change the engine.vscode property to *
  • run npm run postinstall (assuming you have the vscode module as dev-dependency)
  • undo the engine-version change from step 2

@jrieken jrieken mentioned this issue Sep 26, 2016
2 tasks
@chrmarti chrmarti self-assigned this Sep 27, 2016
@chrmarti chrmarti removed their assignment Sep 27, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
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

2 participants