-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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: proposed API for multi root folder changes #42195
Comments
@bpasero You still need to copy the |
@chrmarti yeah thats right! |
I was able to use Code is import * as vscode from 'vscode';
export const activate = (context: vscode.ExtensionContext) => {
vscode.workspace.onDidChangeWorkspaceFolders((e) => {
console.log(e.added.length) // never executed
console.log(e.removed.length)
})
vscode.commands.registerCommand('extension.helloWorld', () => {
vscode.workspace.updateWorkspaceFolders(0, 1) // this did remove one folder
})
}; @bpasero Any ideas? Also instead of |
@octref if do any change that modifies the first folder in the list, the extension host will restart so you will not be able to get any event. |
I can't get |
@jrieken might know |
The flag needs the extension id and I do believe the property in package.json is almost always required |
Refs: #35407
Complexity: 3
There is new proposed API (
updateWorkspaceFolders(start: number, deleteCount: number, ...workspaceFoldersToAdd: { uri: Uri, name?: string }[]): boolean
) to update the workspace folders of the workspace from an extension. The API provides full control over:Verify:
FYI - to test against the latest API do the following:
The text was updated successfully, but these errors were encountered: