Skip to main content

Module FeatureState

Module FeatureState 

Source
Expand description

Feature-specific state management.

§FeatureState Module (ApplicationState)

§RESPONSIBILITIES

Manages feature-specific state including diagnostics, documents, terminals, webviews, tree views, output channels, and markers.

§ARCHITECTURAL ROLE

FeatureState is part of the state organization layer, representing all feature-specific state in the application.

§KEY COMPONENTS

  • Diagnostics: Diagnostic errors state
  • Documents: Open documents state
  • Terminals: Terminal instances state
  • Webviews: Webview panels state
  • TreeViews: Tree view providers state
  • OutputChannels: Output channel state
  • Markers: Marker state
  • State: Main struct combining all feature state

§ERROR HANDLING

Uses Arc<Mutex<...>> for thread-safe access with proper error handling.

§LOGGING

State changes are logged at appropriate levels.

§PERFORMANCE CONSIDERATIONS

  • Lock mutexes briefly
  • Avoid nested locks
  • Use Arc for shared ownership

§TODO

  • Add feature state validation
  • Implement feature lifecycle events
  • Add feature metrics

Modules§

Debug
Debug Module (FeatureState)
Decorations
Editor decoration state. Callers spell Decorations::DecorationsState::{DecorationData, DecorationsState}.
Diagnostics
DiagnosticsState Module (ApplicationState)
Documents
DocumentState Module (ApplicationState)
Keybindings
Keybinding registration state. Callers spell Keybindings::KeybindingState::{KeybindingEntry, KeybindingState}.
LifecyclePhase
Application boot-phase state. Callers spell LifecyclePhase::LifecyclePhaseState::LifecyclePhaseState.
Markers
MarkerState Module (ApplicationState)
NavigationHistory
OutputChannels
OutputChannelState Module (ApplicationState)
State
State Module (FeatureState)
Terminals
TerminalState Module (ApplicationState)
TreeViews
TreeViewState Module (ApplicationState)
Webviews
WebviewState Module (ApplicationState)
WorkingCopy