Also listen to folders change event

This commit is contained in:
Sandeep Somavarapu
2017-09-20 16:46:40 +02:00
parent 5e0c37dd73
commit 53190ab840

View File

@@ -32,7 +32,8 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape {
@IFileService private readonly _fileService: IFileService
) {
this._proxy = extHostContext.get(ExtHostContext.ExtHostWorkspace);
this._contextService.onDidChangeWorkbenchState(this._onDidChangeWorkspaceState, this, this._toDispose);
this._contextService.onDidChangeWorkspaceFolders(this._onDidChangeWorkspace, this, this._toDispose);
this._contextService.onDidChangeWorkbenchState(this._onDidChangeWorkspace, this, this._toDispose);
}
dispose(): void {
@@ -46,7 +47,7 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape {
// --- workspace ---
private _onDidChangeWorkspaceState(): void {
private _onDidChangeWorkspace(): void {
this._proxy.$acceptWorkspaceData(this._contextService.getWorkbenchState() === WorkbenchState.EMPTY ? null : this._contextService.getWorkspace());
}