diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 802c06809ff..92abf31ae24 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -159,7 +159,7 @@ declare module 'vscode' { export function registerFileSystemProvider(scheme: string, provider: FileSystemProvider): Disposable; /** - * Updates the workspace folders of the currently opened workspace. This method allows to add, remove + * Updates the [workspace folders](#workspace.workspaceFolders) of the currently opened workspace. This method allows to add, remove * and change workspace folders a the same time. Use the [onDidChangeWorkspaceFolders()](#onDidChangeWorkspaceFolders) * event to get notified when the workspace folders have been updated. * @@ -181,11 +181,11 @@ declare module 'vscode' { * It is valid to remove an existing workspace folder and add it again with a different name * to rename that folder. * - * Note: if the first workspace folder is added, removed or changed, all extensions will be restarted + * **Note:** if the first workspace folder is added, removed or changed, all extensions will be restarted * so that the (deprecated) `rootPath` property is updated to point to the first workspace * folder. * - * Note: it is not valid to call [updateWorkspaceFolders()](#updateWorkspaceFolders) multiple times + * **Note:** it is not valid to call [updateWorkspaceFolders()](#updateWorkspaceFolders) multiple times * without waiting for the [onDidChangeWorkspaceFolders()](#onDidChangeWorkspaceFolders) to fire. * * @param start the zero-based location in the list of currently opened [workspace folders](#WorkspaceFolder) diff --git a/src/vs/workbench/api/node/extHostWorkspace.ts b/src/vs/workbench/api/node/extHostWorkspace.ts index 5ead32afa25..dd3df1c4149 100644 --- a/src/vs/workbench/api/node/extHostWorkspace.ts +++ b/src/vs/workbench/api/node/extHostWorkspace.ts @@ -222,7 +222,9 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape { } // Try to accept directly - return this.trySetWorkspaceFolders(newWorkspaceFolders); + this.trySetWorkspaceFolders(newWorkspaceFolders); + + return true; } getWorkspaceFolder(uri: vscode.Uri, resolveParent?: boolean): vscode.WorkspaceFolder { @@ -281,7 +283,7 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape { return normalize(result, true); } - private trySetWorkspaceFolders(folders: vscode.WorkspaceFolder[]): boolean { + private trySetWorkspaceFolders(folders: vscode.WorkspaceFolder[]): void { // Update directly here. The workspace is unconfirmed as long as we did not get an // acknowledgement from the main side (via $acceptWorkspaceData) @@ -292,11 +294,7 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape { configuration: this._actualWorkspace.configuration, folders } as IWorkspaceData, this._actualWorkspace).workspace; - - return true; } - - return false; } $acceptWorkspaceData(data: IWorkspaceData): void {