mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Show error message if data provider is registered for unregistered view
This commit is contained in:
parent
55be62ffa9
commit
1659e653c3
|
@ -31,7 +31,12 @@ export class MainThreadTreeViews extends Disposable implements MainThreadTreeVie
|
|||
$registerTreeViewDataProvider(treeViewId: string): void {
|
||||
const dataProvider = this._register(new TreeViewDataProvider(treeViewId, this._proxy, this.notificationService));
|
||||
this._dataProviders.set(treeViewId, dataProvider);
|
||||
this.viewsService.getTreeViewer(treeViewId).dataProvider = dataProvider;
|
||||
const treeViewer = this.viewsService.getTreeViewer(treeViewId);
|
||||
if (treeViewer) {
|
||||
treeViewer.dataProvider = dataProvider;
|
||||
} else {
|
||||
this.notificationService.error('No view is registered with id: ' + treeViewId);
|
||||
}
|
||||
}
|
||||
|
||||
$reveal(treeViewId: string, item: ITreeItem, parentChain: ITreeItem[], options?: { select?: boolean }): TPromise<void> {
|
||||
|
|
Loading…
Reference in a new issue