/********************************************************************************** * Copyright (c) 2024-2025 EclipseSource, Arm Limited and others. * * This program and the accompanying materials are made available under the * terms of the MIT License as outlined in the LICENSE file. **********************************************************************************/ import { VSCodeContext } from '../../vscode/webview-types'; import { CDTTreeTableColumn, CDTTreeTableColumnDefinition } from './tree-table-column-types'; export interface CDTTreeItemResource { __type: string; } /** * A tree item that is used in the CDT tree view. */ export interface CDTTreeItem { __type: 'CDTTreeItem'; id: string; key: string; parent?: CDTTreeItem; children?: CDTTreeItem[]; /** * The resource that this tree item represents. This can be any type of object. */ resource: T; /** * The columns that are displayed for this tree item. */ columns?: Record; /** * Whether this item is pinned. Undefined means that the item can not be pinned. */ pinned?: boolean; /** * Whether this item is expanded. Undefined means that the item is not expanded. */ expanded?: boolean; /** * Whether this item is matched by the current filter. Undefined means that the item is not matched. */ matching?: boolean; } export declare namespace CDTTreeItem { function create(options: Omit, '__type'>): CDTTreeItem; function createRoot(): CDTTreeItem; function isRoot(item: CDTTreeItem): boolean; } /** * The model that is used to initialize the CDT tree view. * It is passed to the webview when the tree view is created / updated. */ export interface CDTTreeExtensionModel { items?: TItems[]; columnFields?: CDTTreeTableColumnDefinition[]; } /** * The view model that is used to update the CDT tree view. * It is the actual model that is used to render the tree view. */ export interface CDTTreeViewModel { root: CDTTreeItem; items: CDTTreeItem[]; expandedKeys: string[]; pinnedKeys: string[]; references: Record | undefined>; resources: Record; } export interface CDTTreeWebviewContext { webviewSection: string; cdtTreeItemId: string; cdtTreeItemType: string; } export declare namespace CDTTreeWebviewContext { function is(context: object): context is CDTTreeWebviewContext; function create(context: CDTTreeWebviewContext): VSCodeContext; } //# sourceMappingURL=tree-model-types.d.ts.map