Skip to main content

Module CustomEditorProvider

Module CustomEditorProvider 

Source
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 type
  • UnregisterCustomEditorProvider - unregister provider
  • OnSaveCustomDocument - workbench → extension save reverse-RPC via $onSaveCustomDocument; returns the sidecar’s error verbatim on failure
  • ResolveCustomEditor - fire-and-forget RPC to populate the webview

§VS Code reference

  • vs/workbench/contrib/customEditor/browser/customEditorService.ts
  • vs/workbench/contrib/customEditor/common/customEditor.ts