Switch webview api back to use delegate model

For #77131

Going back the the delegate based model for a few reasons:

- It gives us a better approach to add additional API hooks in the future (such as for rename)

- In practive, the capabilities were almost always the same as the `userData` on the document. It is rather confusing to have both `userData` and the capabilities 'on' the document
This commit is contained in:
Matt Bierner
2020-03-12 13:12:26 -07:00
parent c65ea4300d
commit 9dae408dc3
6 changed files with 92 additions and 70 deletions

View File

@@ -148,8 +148,8 @@ export class MarkdownPreviewManager extends Disposable implements vscode.Webview
this.registerDynamicPreview(preview);
}
public async resolveCustomDocument(_document: vscode.CustomDocument): Promise<vscode.CustomEditorCapabilities> {
return {};
public async resolveCustomDocument(_document: vscode.CustomDocument): Promise<void> {
// noop
}
public async resolveCustomTextEditor(