提交 313ede61 编写于 作者: M Matt Bierner

Also remove extHostWebview side of the api proposal for webview editor state/save

上级 f75285a4
......@@ -1163,13 +1163,3 @@ export namespace LogLevel {
return types.LogLevel.Info;
}
}
export namespace WebviewContentState {
export function from(state: vscode.WebviewContentState): modes.WebviewContentState {
switch (state) {
case types.WebviewContentState.Readonly: return modes.WebviewContentState.Readonly;
case types.WebviewContentState.Unchanged: return modes.WebviewContentState.Unchanged;
case types.WebviewContentState.Dirty: return modes.WebviewContentState.Dirty;
default: throw new Error('Unknown vscode.WebviewContentState');
}
}
}
......@@ -13,7 +13,7 @@ import { EditorViewColumn } from 'vs/workbench/api/common/shared/editor';
import { asWebviewUri, WebviewInitData } from 'vs/workbench/api/common/shared/webview';
import * as vscode from 'vscode';
import { ExtHostWebviewsShape, IMainContext, MainContext, MainThreadWebviewsShape, WebviewPanelHandle, WebviewPanelViewStateData } from './extHost.protocol';
import { Disposable, WebviewContentState } from './extHostTypes';
import { Disposable } from './extHostTypes';
type IconPath = URI | { light: URI, dark: URI };
......@@ -102,9 +102,6 @@ export class ExtHostWebviewEditor implements vscode.WebviewEditor {
private _viewColumn: vscode.ViewColumn | undefined;
private _visible: boolean = true;
private _active: boolean = true;
private _state: vscode.WebviewEditorState = {
contentState: WebviewContentState.Readonly,
};
_isDisposed: boolean = false;
......@@ -224,15 +221,6 @@ export class ExtHostWebviewEditor implements vscode.WebviewEditor {
this._visible = value;
}
public get editorState(): vscode.WebviewEditorState {
return this._state;
}
public set editorState(newState: vscode.WebviewEditorState) {
this._state = newState;
this._proxy.$setState(this._handle, typeConverters.WebviewContentState.from(newState.contentState));
}
private readonly _onWillSave = new Emitter<{ waitUntil: (thenable: Thenable<boolean>) => void }>();
public readonly onWillSave = this._onWillSave.event;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册