Skip to main content

DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/Environment/
mod.rs

1//! # Environment
2//!
3//! Dependency injection container that provides thread-safe access to
4//! all Mountain providers through trait-based lookups via the `Requires` trait.
5//!
6//! ```text
7//! Component -> Requires<T> -> MountainEnvironment -> Arc<dyn T>
8//! ```
9//!
10//! `MountainEnvironment` implements the `Environment` and `Requires` traits
11//! from the Common crate. It is constructed once during startup and shared
12//! as `Arc<MountainEnvironment>` across all subsystems. Provider trait
13//! implementations are generated by `ProviderTraitImplMacro` to keep
14//! boilerplate minimal.
15//!
16//! ## Provider Traits Implemented
17//!
18//! `CommandExecutor`, `ConfigurationProvider`, `CustomEditorProvider`,
19//! `DebugService`, `DiagnosticManager`, `DocumentProvider`,
20//! `FileSystemReader`/`Writer`, `FileWatcher`, `IPCProvider`,
21//! `KeybindingProvider`, `LanguageFeatureProviderRegistry`,
22//! `OutputChannelManager`, `SearchProvider`, `SecretProvider`,
23//! `SourceControlManagementProvider`, `StatusBarProvider`, `StorageProvider`,
24//! `SynchronizationProvider`, `TerminalProvider`, `TestController`,
25//! `TreeViewProvider`, `UserInterfaceProvider`, `WebviewProvider`,
26//! `WorkspaceProvider`, `WorkspaceEditApplier`, `ExtensionManagementService`.
27//!
28//! Providers use `CommonError` for error reporting. Trait resolution is
29//! compile-time, ensuring type safety with zero runtime overhead.
30
31/// Main dependency injection container struct implementing all provider traits.
32pub mod MountainEnvironment;
33
34/// Declarative macro that generates `Requires<dyn T>` impl blocks
35/// for each provider trait on `MountainEnvironment`. Invoked as
36/// `impl_provider!(CommandExecutor)` from the parent file.
37pub mod ProviderTraitImplMacro;
38
39/// `CommandExecutor` provider: runs shell commands in a managed subprocess.
40pub mod CommandProvider;
41
42/// `ConfigurationProvider`: reads, writes, and watches workspace configuration.
43pub mod ConfigurationProvider;
44
45/// `CustomEditorProvider`: registers and resolves custom editor contributions.
46pub mod CustomEditorProvider;
47
48/// `DebugService`: manages debug adapter protocol sessions.
49pub mod DebugProvider;
50
51/// `DiagnosticManager`: collects and publishes editor diagnostic markers.
52pub mod DiagnosticProvider;
53
54/// `DocumentProvider`: opens, closes, and tracks text document state.
55pub mod DocumentProvider;
56
57/// `FileSystemReader`/`Writer`: async file-system read and write operations.
58pub mod FileSystemProvider;
59
60/// `FileWatcher`: registers file-system watch patterns and delivers change
61/// events.
62pub mod FileWatcherProvider;
63
64/// Server-side path ignore filter applied before file-watcher events
65/// cross the Mountain→Cocoon IPC boundary.
66pub mod FileWatcherIgnore;
67
68/// `IPCProvider`: routes IPC messages between the frontend and backend.
69pub mod IPCProvider;
70
71/// `KeybindingProvider`: resolves keybinding contributions and chord sequences.
72pub mod KeybindingProvider;
73
74/// `LanguageFeatureProviderRegistry`: dispatches LSP-like language features.
75pub mod LanguageFeatureProvider;
76
77/// `OutputChannelManager`: creates and writes to named output channels.
78pub mod OutputProvider;
79
80/// `SearchProvider`: runs workspace-wide text and symbol searches.
81pub mod SearchProvider;
82
83/// `SecretProvider`: reads and writes secrets from the platform credential
84/// store.
85pub mod SecretProvider;
86
87/// `SourceControlManagementProvider`: exposes SCM repository state and actions.
88pub mod SourceControlManagementProvider;
89
90/// `StatusBarProvider`: creates and updates status bar items.
91pub mod StatusBarProvider;
92
93/// `StorageProvider`: persists extension and workspace state blobs.
94pub mod StorageProvider;
95
96/// `SynchronizationProvider`: coordinates cross-window state synchronization.
97pub mod SynchronizationProvider;
98
99/// `TerminalEnvCollection`: per-extension env-var mutations applied at
100/// every PTY spawn. Backed by VS Code's `EnvironmentVariableCollection`
101/// API. See `ActivateExtension.ts` for the wire calls and
102/// `TerminalProvider.rs` for the spawn-time application point.
103pub mod TerminalEnvCollection;
104
105/// `TerminalProvider`: creates and manages integrated terminal instances.
106pub mod TerminalProvider;
107
108/// Terminal sub-modules: shell integration injection and related utilities.
109pub mod Terminal;
110
111/// `TestController`: registers test run profiles and reports test results.
112pub mod TestProvider;
113
114/// `TreeViewProvider`: supplies data for tree-view panel contributions.
115pub mod TreeViewProvider;
116
117/// `UserInterfaceProvider`: drives quick-pick, input-box, and notification UI.
118pub mod UserInterfaceProvider;
119
120/// `WebviewProvider`: creates and manages sandboxed webview panels.
121pub mod WebviewProvider;
122
123/// `WorkspaceProvider`: exposes workspace folders, trust state, and edits.
124pub mod WorkspaceProvider;
125
126/// Shared helpers used across multiple provider implementations.
127pub mod Utility;