mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 01:58:53 +01:00
Custom Editors: pass original edit objects back to extensions
For #88719 With this change, instead of passing custom editor edit json back and forth with the extension host, we keep the original edit objects on the extension host. This means that we can pass extensions back the exact same edit object they first hand to us. It also means that edits no longer need to be json serializable.
This commit is contained in:
@@ -584,7 +584,7 @@ export interface MainThreadWebviewsShape extends IDisposable {
|
||||
$registerEditorProvider(extension: WebviewExtensionDescription, viewType: string, options: modes.IWebviewPanelOptions, capabilities: readonly WebviewEditorCapabilities[]): void;
|
||||
$unregisterEditorProvider(viewType: string): void;
|
||||
|
||||
$onEdit(resource: UriComponents, viewType: string, editJson: any): void;
|
||||
$onEdit(resource: UriComponents, viewType: string, editId: number): void;
|
||||
}
|
||||
|
||||
export interface WebviewPanelViewStateData {
|
||||
@@ -604,8 +604,9 @@ export interface ExtHostWebviewsShape {
|
||||
$deserializeWebviewPanel(newWebviewHandle: WebviewPanelHandle, viewType: string, title: string, state: any, position: EditorViewColumn, options: modes.IWebviewOptions & modes.IWebviewPanelOptions): Promise<void>;
|
||||
$resolveWebviewEditor(resource: UriComponents, newWebviewHandle: WebviewPanelHandle, viewType: string, title: string, position: EditorViewColumn, options: modes.IWebviewOptions & modes.IWebviewPanelOptions): Promise<void>;
|
||||
|
||||
$undoEdits(resource: UriComponents, viewType: string, edits: readonly any[]): void;
|
||||
$applyEdits(resource: UriComponents, viewType: string, edits: readonly any[]): void;
|
||||
$undoEdits(resource: UriComponents, viewType: string, editIds: readonly number[]): void;
|
||||
$applyEdits(resource: UriComponents, viewType: string, editIds: readonly number[]): void;
|
||||
$disposeEdits(editIds: readonly number[]): void;
|
||||
|
||||
$onSave(resource: UriComponents, viewType: string): Promise<void>;
|
||||
$onSaveAs(resource: UriComponents, viewType: string, targetResource: UriComponents): Promise<void>;
|
||||
|
||||
Reference in New Issue
Block a user