mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Rename custom editor contribution point
Renaming to match new API proposal
This commit is contained in:
parent
8291f8c152
commit
dc1e7871b8
|
@ -22,10 +22,10 @@
|
|||
"onCommand:imagePreview.zoomOut"
|
||||
],
|
||||
"contributes": {
|
||||
"webviewEditors": [
|
||||
"customEditors": [
|
||||
{
|
||||
"viewType": "imagePreview.previewEditor",
|
||||
"displayName": "%webviewEditors.displayName%",
|
||||
"displayName": "%customEditors.displayName%",
|
||||
"priority": "builtin",
|
||||
"selector": [
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"displayName": "Image Preview",
|
||||
"description": "Provides VS Code's built-in image preview",
|
||||
"webviewEditors.displayName": "Image Preview",
|
||||
"customEditors.displayName": "Image Preview",
|
||||
"command.zoomIn": "Zoom in",
|
||||
"command.zoomOut": "Zoom out"
|
||||
}
|
||||
|
|
|
@ -309,7 +309,7 @@
|
|||
"markdown.previewScripts": [
|
||||
"./media/index.js"
|
||||
],
|
||||
"webviewEditors": [
|
||||
"customEditors": [
|
||||
{
|
||||
"viewType": "vscode.markdown.preview.editor",
|
||||
"displayName": "(Experimental) VS Code Markdown Preview",
|
||||
|
|
|
@ -123,7 +123,7 @@ export interface IExtensionContributions {
|
|||
views?: { [location: string]: IView[] };
|
||||
colors?: IColor[];
|
||||
localizations?: ILocalization[];
|
||||
readonly webviewEditors?: readonly IWebviewEditor[];
|
||||
readonly customEditors?: readonly IWebviewEditor[];
|
||||
readonly codeActions?: readonly ICodeActionContribution[];
|
||||
}
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@ class WebviewEditorCustomDocument extends Disposable implements vscode.CustomDoc
|
|||
|
||||
public userData: unknown;
|
||||
|
||||
public _capabilities?: vscode.CustomEditorCapabilities;
|
||||
public _capabilities?: vscode.CustomEditorCapabilities = undefined;
|
||||
|
||||
constructor(
|
||||
private readonly _proxy: MainThreadWebviewsShape,
|
||||
|
|
|
@ -24,7 +24,7 @@ interface IWebviewEditorsExtensionPoint {
|
|||
}
|
||||
|
||||
const webviewEditorsContribution: IJSONSchema = {
|
||||
description: nls.localize('contributes.webviewEditors', 'Contributes webview editors.'),
|
||||
description: nls.localize('contributes.customEditors', 'Contributed custom editors.'),
|
||||
type: 'array',
|
||||
defaultSnippets: [{ body: [{ viewType: '', displayName: '' }] }],
|
||||
items: {
|
||||
|
@ -76,7 +76,7 @@ const webviewEditorsContribution: IJSONSchema = {
|
|||
};
|
||||
|
||||
export const webviewEditorsExtensionPoint = ExtensionsRegistry.registerExtensionPoint<IWebviewEditorsExtensionPoint[]>({
|
||||
extensionPoint: 'webviewEditors',
|
||||
extensionPoint: 'customEditors',
|
||||
deps: [languagesExtPoint],
|
||||
jsonSchema: webviewEditorsContribution
|
||||
});
|
||||
|
|
|
@ -1060,7 +1060,7 @@ export class ExtensionEditor extends BaseEditor {
|
|||
}
|
||||
|
||||
private renderCustomEditors(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean {
|
||||
const webviewEditors = manifest.contributes?.webviewEditors || [];
|
||||
const webviewEditors = manifest.contributes?.customEditors || [];
|
||||
if (!webviewEditors.length) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue