/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; import { Uri } from "vscode"; import { RhamtConfiguration } from 'raas-core'; export declare class RhamtTreeDataProvider implements vscode.TreeDataProvider, vscode.Disposable { public static readonly subscriptionContextValue: string; public onDidChangeTreeData: vscode.Event; public onNodeCreate: vscode.Event; constructor(resourceProvider: IChildProvider, loadMoreCommandId: string, rootTreeItems?: IRhamtParentTreeItem[]); public getTreeItem(node: IRhamtNode): vscode.TreeItem; public getChildren(node?: IRhamtParentNode): Promise; public refresh(node?: IRhamtNode, clearCache?: boolean): Promise; public loadMore(node: IRhamtNode): Promise; public findNode(id: string): Promise; public dispose(): void; } export interface IRhamtNode { readonly id: string; readonly treeItem: T; readonly parent?: IRhamtParentNode; readonly treeDataProvider: RhamtTreeDataProvider; refresh(): Promise; deleteNode(): Promise; run(description: string, callback: () => Promise): Promise; } export interface IRhamtParentNode extends IRhamtNode { createChild(userOptions?: any): Promise; getCachedChildren(): Promise; } export interface IRhamtTreeItem { id?: string; label: string; description?: string; iconPath?: string | Uri | { light: string | Uri; dark: string | Uri }; commandId?: string; contextValue: string; deleteTreeItem?(node: IRhamtNode): Promise; refreshLabel?(node: IRhamtNode): Promise; isAncestorOf?(contextValue: string): boolean; } export interface IChildProvider { readonly childTypeLabel?: string; loadMoreChildren(node: IRhamtNode, clearCache: boolean): Promise; hasMoreChildren(): boolean; createChild?(node: IRhamtNode, showCreatingNode: (label: string) => void, userOptions?: any): Promise; compareChildren?(node1: IRhamtNode, node2: IRhamtNode): number; } export interface IRhamtParentTreeItem extends IRhamtTreeItem, IChildProvider { pickTreeItem?(expectedContextValue: string): IRhamtTreeItem | undefined; }