diff --git a/src/vs/workbench/api/node/mainThreadTreeExplorers.ts b/src/vs/workbench/api/node/mainThreadTreeExplorers.ts index 7095b535668..1116abd95c4 100644 --- a/src/vs/workbench/api/node/mainThreadTreeExplorers.ts +++ b/src/vs/workbench/api/node/mainThreadTreeExplorers.ts @@ -7,7 +7,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { ExtHostContext, MainThreadTreeExplorersShape, ExtHostTreeExplorersShape } from './extHost.protocol'; -import { ICustomTreeExplorerService } from 'vs/workbench/parts/explorers/browser/customTreeExplorerService'; +import { ICustomTreeExplorerService } from 'vs/workbench/parts/explorers/common/customTreeExplorerService'; import { InternalTreeExplorerNodeContent } from 'vs/workbench/parts/explorers/common/treeExplorerViewModel'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { ICommandService } from 'vs/platform/commands/common/commands'; diff --git a/src/vs/workbench/parts/explorers/browser/customTreeExplorerService.ts b/src/vs/workbench/parts/explorers/browser/customTreeExplorerService.ts index 37fa4646164..9983ec6ccc8 100644 --- a/src/vs/workbench/parts/explorers/browser/customTreeExplorerService.ts +++ b/src/vs/workbench/parts/explorers/browser/customTreeExplorerService.ts @@ -4,27 +4,13 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import Event, { Emitter } from 'vs/base/common/event'; import { localize } from 'vs/nls'; import { TPromise } from 'vs/base/common/winjs.base'; -import { IInstantiationService, createDecorator } from 'vs/platform/instantiation/common/instantiation'; -import { InternalTreeExplorerNode, InternalTreeExplorerNodeProvider } from 'vs/workbench/parts/explorers/common/treeExplorerViewModel'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; -import Event, { Emitter } from 'vs/base/common/event'; - -export const ICustomTreeExplorerService = createDecorator('customTreeExplorerService'); - -export interface ICustomTreeExplorerService { - _serviceBrand: any; - - onTreeExplorerNodeProviderRegistered: Event; - - registerTreeExplorerNodeProvider(providerId: string, provider: InternalTreeExplorerNodeProvider): void; - hasProvider(providerId: string): boolean; - - provideRootNode(providerId: string): TPromise; - resolveChildren(providerId: string, node: InternalTreeExplorerNode): TPromise; - executeCommand(providerId: string, node: InternalTreeExplorerNode): TPromise; -} +import { InternalTreeExplorerNode, InternalTreeExplorerNodeProvider } from 'vs/workbench/parts/explorers/common/treeExplorerViewModel'; +import { ICustomTreeExplorerService } from 'vs/workbench/parts/explorers/common/customTreeExplorerService'; export class CustomTreeExplorerService implements ICustomTreeExplorerService { public _serviceBrand: any; diff --git a/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.ts b/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.ts index 5b999c8dd73..4cbed3955ca 100644 --- a/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.ts +++ b/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.ts @@ -12,7 +12,8 @@ import { createCSSRule } from 'vs/base/browser/dom'; import { Registry } from 'vs/platform/platform'; import { ExtensionsRegistry } from 'vs/platform/extensions/common/extensionsRegistry'; import { IJSONSchema } from 'vs/base/common/jsonSchema'; -import { ICustomTreeExplorerService, CustomTreeExplorerService } from 'vs/workbench/parts/explorers/browser/customTreeExplorerService'; +import { ICustomTreeExplorerService } from 'vs/workbench/parts/explorers/common/customTreeExplorerService'; +import { CustomTreeExplorerService } from 'vs/workbench/parts/explorers/browser/customTreeExplorerService'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { ViewletRegistry, Extensions as ViewletExtensions, ViewletDescriptor } from 'vs/workbench/browser/viewlet'; import { ITreeExplorer } from 'vs/platform/extensionManagement/common/extensionManagement'; diff --git a/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.ts b/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.ts index c01cdb5540c..f30370637f3 100644 --- a/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.ts +++ b/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.ts @@ -16,7 +16,7 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { ICustomTreeExplorerService } from 'vs/workbench/parts/explorers/browser/customTreeExplorerService'; +import { ICustomTreeExplorerService } from 'vs/workbench/parts/explorers/common/customTreeExplorerService'; import { ITree } from 'vs/base/parts/tree/browser/tree'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { TreeExplorerViewletState, TreeDataSource, TreeRenderer, TreeController } from 'vs/workbench/parts/explorers/browser/views/treeExplorerViewer'; diff --git a/src/vs/workbench/parts/explorers/browser/views/treeExplorerViewer.ts b/src/vs/workbench/parts/explorers/browser/views/treeExplorerViewer.ts index ae13a5c041b..27fc03aa8a1 100644 --- a/src/vs/workbench/parts/explorers/browser/views/treeExplorerViewer.ts +++ b/src/vs/workbench/parts/explorers/browser/views/treeExplorerViewer.ts @@ -16,7 +16,7 @@ import { ContributableActionProvider } from 'vs/workbench/browser/actionBarRegis import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { IModeService } from 'vs/editor/common/services/modeService'; -import { ICustomTreeExplorerService } from 'vs/workbench/parts/explorers/browser/customTreeExplorerService'; +import { ICustomTreeExplorerService } from 'vs/workbench/parts/explorers/common/customTreeExplorerService'; import { IProgressService } from 'vs/platform/progress/common/progress'; export class TreeDataSource implements IDataSource { diff --git a/src/vs/workbench/parts/explorers/common/customTreeExplorerService.ts b/src/vs/workbench/parts/explorers/common/customTreeExplorerService.ts new file mode 100644 index 00000000000..00a402e68c9 --- /dev/null +++ b/src/vs/workbench/parts/explorers/common/customTreeExplorerService.ts @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import Event from 'vs/base/common/event'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; +import { InternalTreeExplorerNode, InternalTreeExplorerNodeProvider } from 'vs/workbench/parts/explorers/common/treeExplorerViewModel'; + +export const ICustomTreeExplorerService = createDecorator('customTreeExplorerService'); + +export interface ICustomTreeExplorerService { + _serviceBrand: any; + + onTreeExplorerNodeProviderRegistered: Event; + + registerTreeExplorerNodeProvider(providerId: string, provider: InternalTreeExplorerNodeProvider): void; + hasProvider(providerId: string): boolean; + + provideRootNode(providerId: string): TPromise; + resolveChildren(providerId: string, node: InternalTreeExplorerNode): TPromise; + executeCommand(providerId: string, node: InternalTreeExplorerNode): TPromise; +}