pub struct TreeItemDTO {
pub Handle: String,
pub ParentHandle: Option<String>,
pub Label: Option<Value>,
pub Description: Option<String>,
pub ResourceURI: Option<Value>,
pub Tooltip: Option<Value>,
pub Command: Option<Value>,
pub CollapsibleState: u32,
pub ContextValue: Option<String>,
pub Icon: Option<Value>,
pub ThemeIcon: Option<Value>,
pub CheckboxState: Option<Value>,
}Expand description
A serializable struct that represents a vscode.TreeItem.
This DTO is sent from Cocoon (where the TreeDataProvider logic lives)
to Mountain (where the UI state is managed) to describe how to render an
item in a tree view. It uses serde_json::Value for complex properties to
maintain flexibility and compatibility with the VS Code API.
Fields§
§Handle: StringA unique handle for this item within its tree view, generated by Cocoon.
ParentHandle: Option<String>The handle of the parent item, if any.
Label: Option<Value>The label for the tree item. Can be a simple string or a
TreeItemLabel object for highlighting.
Description: Option<String>A human-readable description for the tree item.
ResourceURI: Option<Value>The URI of the resource represented by this item. Serialized
UriComponents.
Tooltip: Option<Value>The tooltip to show when hovering over the item. Serialized string or
IMarkdownStringDTO.
Command: Option<Value>The command to execute when the item is selected. Serialized
CommandDTO.
CollapsibleState: u32The collapsible state of the item (e.g., None, Collapsed, Expanded).
Corresponds to vscode.TreeItemCollapsibleState.
ContextValue: Option<String>A string that can be used for context-menu visibility (when clauses).
Icon: Option<Value>A path to an icon or a light/dark pair of paths. Serialized
UriComponents.
ThemeIcon: Option<Value>A ThemeIcon identifier (e.g., ‘file-code’). Serialized ThemeIcon.
CheckboxState: Option<Value>The state of a checkbox displayed next to the tree item, if any.
Serialized CheckboxState.
Trait Implementations§
Source§impl Clone for TreeItemDTO
impl Clone for TreeItemDTO
Source§fn clone(&self) -> TreeItemDTO
fn clone(&self) -> TreeItemDTO
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more