have an explicit WorkspaceFolder with some extra bits and pieces, #28526

This commit is contained in:
Johannes Rieken
2017-07-13 16:18:02 +02:00
parent 537c0746c2
commit 0df555f5f4
6 changed files with 97 additions and 47 deletions

View File

@@ -367,11 +367,14 @@ export function createApiFactory(
set rootPath(value) {
throw errors.readonly();
},
getContainingWorkspaceFolder(resource) {
return extHostWorkspace.getEnclosingWorkspaceFolder(resource);
},
get workspaceFolders() {
// proposed api
assertProposedApi(extension);
apiUsage.publicLog('workspace#workspaceFolders');
return extHostWorkspace.getRoots();
return extHostWorkspace.getWorkspaceFolders();
},
onDidChangeWorkspaceFolders: proposedApiFunction(extension, (listener, thisArgs?, disposables?) => {
// proposed api