Make nodeProvider generic and add contentProvider

This commit is contained in:
Pine Wu
2016-10-13 10:38:18 -07:00
parent 30e3be2c43
commit b8ce9ad768
5 changed files with 32 additions and 25 deletions

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import { TreeExplorerNode } from 'vscode';
import { TreeExplorerNodeContent } from 'vscode';
import { TPromise } from 'vs/base/common/winjs.base';
import { IThreadService } from 'vs/workbench/services/thread/common/threadService';
import { ExtHostContext, MainThreadTreeExplorersShape, ExtHostTreeExplorersShape } from './extHost.protocol';
@@ -18,7 +18,7 @@ export class MainThreadTreeExplorers extends MainThreadTreeExplorersShape {
constructor(
@IThreadService threadService: IThreadService,
@ITreeExplorerService private treeExplorerViewletService: ITreeExplorerService
@ITreeExplorerService private treeExplorerService: ITreeExplorerService
) {
super();
@@ -27,7 +27,7 @@ export class MainThreadTreeExplorers extends MainThreadTreeExplorersShape {
}
$registerTreeContentProvider(providerId: string): void {
this.treeExplorerViewletService.registerTreeContentProvider(providerId, {
this.treeExplorerService.registerTreeContentProvider(providerId, {
provideRootNode: (): TPromise<InternalTreeExplorerNode> => {
return this._proxy.$provideRootNode(providerId).then(treeContent => {
this._treeContents[providerId] = treeContent;