From eb5c8a0208301cba37bf9498d5b2f4df4c8a94e9 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 21 Aug 2019 16:37:57 +0200 Subject: [PATCH] fixes #78510 --- .../browser/views/explorerDecorationsProvider.ts | 4 ++++ .../contrib/files/browser/views/explorerViewer.ts | 5 ++++- .../workbench/contrib/files/common/explorerModel.ts | 11 ++++++++--- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.ts b/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.ts index f1708ff4d49..eb1f7705faf 100644 --- a/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.ts +++ b/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.ts @@ -11,6 +11,7 @@ import { IDecorationsProvider, IDecorationData } from 'vs/workbench/services/dec import { listInvalidItemForeground } from 'vs/platform/theme/common/colorRegistry'; import { DisposableStore } from 'vs/base/common/lifecycle'; import { IExplorerService } from 'vs/workbench/contrib/files/common/files'; +import { explorerRootErrorEmitter } from 'vs/workbench/contrib/files/browser/views/explorerViewer'; export class ExplorerDecorationsProvider implements IDecorationsProvider { readonly label: string = localize('label', "Explorer"); @@ -30,6 +31,9 @@ export class ExplorerDecorationsProvider implements IDecorationsProvider { this._onDidChange.fire([change.item.resource]); } })); + this.toDispose.add(explorerRootErrorEmitter.event((resource => { + this._onDidChange.fire([resource]); + }))); } get onDidChange(): Event { diff --git a/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts b/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts index d8d9f52f320..016249db38c 100644 --- a/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts +++ b/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts @@ -46,6 +46,7 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic import { IWorkspaceFolderCreationData } from 'vs/platform/workspaces/common/workspaces'; import { findValidPasteFileTarget } from 'vs/workbench/contrib/files/browser/fileActions'; import { FuzzyScore, createMatches } from 'vs/base/common/filters'; +import { Emitter } from 'vs/base/common/event'; export class ExplorerDelegate implements IListVirtualDelegate { @@ -60,6 +61,7 @@ export class ExplorerDelegate implements IListVirtualDelegate { } } +export const explorerRootErrorEmitter = new Emitter(); export class ExplorerDataSource implements IAsyncDataSource { constructor( @@ -87,8 +89,9 @@ export class ExplorerDataSource implements IAsyncDataSource