API: expose workspace.name property (fixes #36802) (#36803)

This commit is contained in:
Benjamin Pasero
2017-10-25 11:54:09 +02:00
committed by GitHub
parent f8d858d1a1
commit 0b0733774d
2 changed files with 14 additions and 0 deletions

View File

@@ -397,6 +397,12 @@ export function createApiFactory(
get workspaceFolders() {
return extHostWorkspace.getWorkspaceFolders();
},
get name() {
return extHostWorkspace.workspace ? extHostWorkspace.workspace.name : undefined;
},
set name(value) {
throw errors.readonly();
},
onDidChangeWorkspaceFolders: function (listener, thisArgs?, disposables?) {
return extHostWorkspace.onDidChangeWorkspace(listener, thisArgs, disposables);
},