Move webview content state into webviewPanel instead of webviewEditor

Split out from #77131

The current webview editor api is very procedural. This model has some problems when it comes to supporting editing resources, but actually does make a lot of sense for webviews that aren't backed by real file system resources. For example, if you have a webview that edits some document in the cloud, you should not be required to implement a custom file system provider just to enable basic saving.

This change moves the `onWillSave` and `webviewEditorState` properties back onto `WebviewPanel` instead of keeping them specific to `WebviewEditor`. The save implementation does not fully work yet, as the will require #81521
This commit is contained in:
Matt Bierner
2019-09-26 18:05:37 -07:00
parent e5efdb4b4b
commit e0762af258
9 changed files with 39 additions and 29 deletions

View File

@@ -909,7 +909,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
CallHierarchyItem: extHostTypes.CallHierarchyItem,
DebugConsoleMode: extHostTypes.DebugConsoleMode,
Decoration: extHostTypes.Decoration,
WebviewEditorState: extHostTypes.WebviewEditorState,
WebviewContentState: extHostTypes.WebviewContentState,
UIKind: UIKind
};
};