/******************************************************************************** * Copyright (C) 2024-2025 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 type { NotificationType } from 'vscode-messenger-common'; import type { CDTTreeExtensionModel } from './tree-model-types'; export interface CDTTreeNotification { data: T; } export interface CDTTreeTerminatedEvent { /** * The number of remaining trees. */ remaining: number; data: T; } export interface CDTTreeExecuteCommand { commandId: string; itemId: string; value?: unknown; } export interface CDTTreePartialUpdate { items?: TItem[]; } export namespace CDTTreeMessengerType { /** * Replace the current state with the given state. */ export const updateState: NotificationType = { method: 'updateState' }; /** * Update the nodes with the given nodes. */ export const updatePartial: NotificationType = { method: 'updatePartial' }; export const ready: NotificationType = { method: 'ready' }; export const executeCommand: NotificationType> = { method: 'executeCommand' }; export const toggleNode: NotificationType> = { method: 'toggleNode' }; export const clickNode: NotificationType> = { method: 'clickNode' }; export const openSearch: NotificationType = { method: 'openSearch' }; export const searchChanged: NotificationType> = { method: 'searchChanged' }; }