Cleaner API to query tasks

This commit is contained in:
Dirk Baeumer
2018-03-16 11:48:23 +01:00
parent 52086ecf32
commit fc7051a897
7 changed files with 92 additions and 36 deletions

View File

@@ -125,6 +125,10 @@ class ExtHostWorkspaceImpl extends Workspace {
}
return this._structure.findSubstr(uri.toString());
}
resolveWorkspaceFolder(uri: URI): vscode.WorkspaceFolder {
return this._structure.get(uri.toString());
}
}
export class ExtHostWorkspace implements ExtHostWorkspaceShape {
@@ -239,6 +243,13 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape {
return this._actualWorkspace.getWorkspaceFolder(uri, resolveParent);
}
resolveWorkspaceFolder(uri: vscode.Uri): vscode.WorkspaceFolder {
if (!this._actualWorkspace) {
return undefined;
}
return this._actualWorkspace.resolveWorkspaceFolder(uri);
}
getPath(): string {
// this is legacy from the days before having