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

Improve JSDoc of updateWorkspaceFolders #42632

Closed
weinand opened this issue Jan 31, 2018 · 1 comment
Closed

Improve JSDoc of updateWorkspaceFolders #42632

weinand opened this issue Jan 31, 2018 · 1 comment
Assignees
Milestone

Comments

@weinand
Copy link
Contributor

weinand commented Jan 31, 2018

testing #42195:

The JSDoc of updateWorkspaceFolders explains what you can do with it but not what it actually does.
I suggest to add something like the following as the first sentence:

"On the array 'vscode.workspace.workspaceFolders' this method replaces 'deleteCount' folders starting at index 'start' by an optional set of 'workspaceFoldersToAdd'. This "splice" behavior can be used to add, remove and change workspace folders in a single operation."

In addition I suggest to explicitly state that the code that changes the first folder is aborted immediately. So the extension must be prepared to recover from this situation. Just reading an innocent sentence like "all extensions will be restarted" does not make this problem clear.

@bpasero bpasero added this to the January 2018 milestone Jan 31, 2018
@bpasero
Copy link
Member

bpasero commented Jan 31, 2018

@weinand

image

@bpasero bpasero closed this as completed Jan 31, 2018
bpasero added a commit that referenced this issue Jan 31, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants