Mountain/ApplicationState/State/FeatureState/
State.rs1use super::{
39 Debug::DebugState::DebugState,
40 Decorations::DecorationsState::DecorationsState,
41 Diagnostics::DiagnosticsState::DiagnosticsState,
42 Documents::DocumentState::DocumentState,
43 Keybindings::KeybindingState::KeybindingState,
44 LifecyclePhase::LifecyclePhaseState::LifecyclePhaseState,
45 Markers::MarkerState::MarkerState,
46 NavigationHistory::NavigationHistoryState::NavigationHistoryState,
47 OutputChannels::OutputChannelState::OutputChannelState,
48 Terminals::TerminalState::TerminalState,
49 TreeViews::TreeViewState::TreeViewState,
50 Webviews::WebviewState::WebviewState,
51 WorkingCopy::WorkingCopyState::WorkingCopyState,
52};
53use crate::dev_log;
54
55#[derive(Clone)]
57pub struct State {
58 pub Debug:DebugState,
60
61 pub Decorations:DecorationsState,
64
65 pub Diagnostics:DiagnosticsState,
67
68 pub Documents:DocumentState,
70
71 pub Keybindings:KeybindingState,
73
74 pub Lifecycle:LifecyclePhaseState,
76
77 pub NavigationHistory:NavigationHistoryState,
79
80 pub Markers:MarkerState,
82
83 pub OutputChannels:OutputChannelState,
85
86 pub Terminals:TerminalState,
88
89 pub TreeViews:TreeViewState,
91
92 pub Webviews:WebviewState,
94
95 pub WorkingCopy:WorkingCopyState,
97}
98
99impl Default for State {
100 fn default() -> Self {
101 dev_log!("lifecycle", "[FeatureState::State] Initializing default feature state...");
102
103 Self {
104 Debug:Default::default(),
105 Decorations:Default::default(),
106 Diagnostics:Default::default(),
107 Documents:Default::default(),
108 Keybindings:Default::default(),
109 Lifecycle:Default::default(),
110 Markers:Default::default(),
111 NavigationHistory:Default::default(),
112 OutputChannels:Default::default(),
113 Terminals:Default::default(),
114 TreeViews:Default::default(),
115 Webviews:Default::default(),
116 WorkingCopy:Default::default(),
117 }
118 }
119}
120
121impl State {
122 pub fn GetNextTerminalIdentifier(&self) -> u64 { self.Terminals.GetNextTerminalIdentifier() }
124
125 pub fn GetNextSourceControlManagementProviderHandle(&self) -> u32 {
127 self.Markers.GetNextSourceControlManagementProviderHandle()
128 }
129}