mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
Make nodeProvider generic and add contentProvider
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user