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