Expand description
CustomEditorProvider: registers and resolves custom editor contributions.
§CustomEditorProvider (Environment)
Implements
CustomEditorProvider
for MountainEnvironment, managing registration and lifecycle of custom
non-text editors. Coordinates Webview-based editing experiences (SVG
editors, diff viewers, etc.) and handles editor resolution, save
operations, and provider unregistration.
Uses IPCProvider for RPC communication
with Cocoon and integrates with ApplicationState for provider registration
persistence.
§Methods
RegisterCustomEditorProvider- register extension provider by view typeUnregisterCustomEditorProvider- unregister providerOnSaveCustomDocument- workbench → extension save reverse-RPC via$onSaveCustomDocument; returns the sidecar’s error verbatim on failureResolveCustomEditor- fire-and-forget RPC to populate the webview
§VS Code reference
vs/workbench/contrib/customEditor/browser/customEditorService.tsvs/workbench/contrib/customEditor/common/customEditor.ts