'use strict'; import * as path from 'path'; import { EventEmitter } from 'vscode'; import { RhamtTreeDataProvider, IRhamtNode, IChildProvider } from './index'; import { RhamtParentNode } from './RhamtParentNode'; export class ConfigurationNode extends RhamtParentNode { public static readonly contextValue: string = 'rhamt.rhamtConfiguration'; private readonly _treeDataProvider: RhamtTreeDataProvider; public constructor(treeDataProvider: RhamtTreeDataProvider, childProvider: IChildProvider, nodeId: string, label: string, onNodeCreateEmitter: EventEmitter) { super(undefined, { id: nodeId, label: label, commandId: 'rhamt.openConfiguration', contextValue: ConfigurationNode.contextValue, iconPath: path.join(__filename, '..', '..', '..', 'resources', 'rhamtConfiguration.svg'), childTypeLabel: childProvider.childTypeLabel, compareChildren: childProvider.compareChildren, createChild: childProvider.createChild ? childProvider.createChild.bind(childProvider) : undefined, hasMoreChildren: childProvider.hasMoreChildren.bind(childProvider), loadMoreChildren: childProvider.loadMoreChildren.bind(childProvider) }, onNodeCreateEmitter); this._treeDataProvider = treeDataProvider; } public get treeDataProvider(): RhamtTreeDataProvider { return this._treeDataProvider; } }