UNPKG

rhamt-vscode-extension

Version:

RHAMT VSCode extension

33 lines (27 loc) 1.58 kB
'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<IRhamtNode>) { 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 ? <typeof childProvider.createChild>childProvider.createChild.bind(childProvider) : undefined, hasMoreChildren: <typeof childProvider.hasMoreChildren>childProvider.hasMoreChildren.bind(childProvider), loadMoreChildren: <typeof childProvider.loadMoreChildren>childProvider.loadMoreChildren.bind(childProvider) }, onNodeCreateEmitter); this._treeDataProvider = treeDataProvider; } public get treeDataProvider(): RhamtTreeDataProvider { return this._treeDataProvider; } }