Expand description
Β§TreeViewProvider (Environment)
Implements the
TreeViewProvider trait for
MountainEnvironment.
This provider manages the lifecycle of custom tree views and orchestrates data flow between the extension host (Cocoon) and the UI (Sky). It handles registration, data dispatching, UI state updates, events, and state persistence.
Β§Implementation Strategy
The trait implementation is split across multiple helper modules for maintainability:
Registration:RegisterTreeDataProvider,UnregisterTreeDataProviderDataAccess:GetChildren,GetTreeItem(dispatcher logic)UIState:SetTreeViewMessage,SetTreeViewTitle,SetTreeViewBadgeEvents:OnTreeNodeExpanded,OnTreeSelectionChangedStatePersistence:PersistTreeViewState,RestoreTreeViewStateVisibility:RevealTreeItem,RefreshTreeView
The single impl TreeViewProvider for MountainEnvironment block in this
file delegates to those helper functions. This satisfies Rustβs orphan rules
while keeping code organized.
ModulesΒ§
- Data
Access π - Tree View Data Access Helpers
- Events π
- Tree View Event Handlers
- Registration π
- Tree View Registration Helpers
- State
Persistence π - Tree View State Persistence Helpers
- UIState π
- Tree View UI State Helpers
- Visibility π
- Tree View Visibility Helpers