CustomEditorProvider

Provider for editable custom editors that use a custom document model.

Custom editors use {@linkcode CustomDocument} as their document model instead of a {@linkcode TextDocument}. This gives extensions full control over actions such as edit, save, and backup.

You should use this type of custom editor when dealing with binary files or more complex scenarios. For simple text based documents, use {@linkcode CustomTextEditorProvider} instead.

Parameters

T

Type of the custom document returned by this provider.

Online Documentation

Properties

Link copied to clipboard

Signal that an edit has occurred inside a custom editor.

Functions

Link copied to clipboard

Back up a dirty custom document.

Link copied to clipboard

Create a new document for a given resource.

Link copied to clipboard
abstract fun resolveCustomEditor(document: T, webviewPanel: WebviewPanel, token: CancellationToken): PromiseLike<Void?>?

Resolve a custom editor for a given resource.

Link copied to clipboard
abstract fun revertCustomDocument(document: T, cancellation: CancellationToken): PromiseLike<Void?>

Revert a custom document to its last saved state.

Link copied to clipboard
abstract fun saveCustomDocument(document: T, cancellation: CancellationToken): PromiseLike<Void?>

Save a custom document.

Link copied to clipboard
abstract fun saveCustomDocumentAs(document: T, destination: Uri, cancellation: CancellationToken): PromiseLike<Void?>

Save a custom document to a different location.