Handle all error by showing message

This commit is contained in:
Pine Wu
2016-10-20 22:54:52 -07:00
parent 0b84a56e4f
commit 37398ea53e
4 changed files with 46 additions and 21 deletions

View File

@@ -9,13 +9,15 @@ import { IThreadService } from 'vs/workbench/services/thread/common/threadServic
import { ExtHostContext, MainThreadTreeExplorersShape, ExtHostTreeExplorersShape } from './extHost.protocol';
import { ITreeExplorerViewletService } from 'vs/workbench/parts/explorers/browser/treeExplorerViewletService';
import { InternalTreeExplorerNode } from 'vs/workbench/parts/explorers/common/treeExplorerViewModel';
import { IMessageService, Severity } from 'vs/platform/message/common/message';
export class MainThreadTreeExplorers extends MainThreadTreeExplorersShape {
private _proxy: ExtHostTreeExplorersShape;
constructor(
@IThreadService threadService: IThreadService,
@ITreeExplorerViewletService private treeExplorerService: ITreeExplorerViewletService
@ITreeExplorerViewletService private treeExplorerService: ITreeExplorerViewletService,
@IMessageService private messageService: IMessageService
) {
super();
@@ -35,4 +37,8 @@ export class MainThreadTreeExplorers extends MainThreadTreeExplorersShape {
}
});
}
$showMessage(severity: Severity, message: string): void {
this.messageService.show(severity, message);
}
}