From d82bb0ec7703a1b20cee61cf7a024081237bec10 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 10 Sep 2020 11:28:24 -0700 Subject: [PATCH] Improve views contribution point - add required properties - add default snippet - use `markdownDescription` for markdown string --- src/vs/workbench/api/browser/viewsExtensionPoint.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/api/browser/viewsExtensionPoint.ts b/src/vs/workbench/api/browser/viewsExtensionPoint.ts index 12bea9295b5..8f57b8cfb98 100644 --- a/src/vs/workbench/api/browser/viewsExtensionPoint.ts +++ b/src/vs/workbench/api/browser/viewsExtensionPoint.ts @@ -107,6 +107,8 @@ enum InitialVisibility { const viewDescriptor: IJSONSchema = { type: 'object', + required: ['id', 'name'], + defaultSnippets: [{ body: { id: '${1:id}', name: '${2:name}' } }], properties: { type: { markdownDescription: localize('vscode.extension.contributes.view.type', "Type of the the view. This can either be `tree` for a tree view based view or `webview` for a webview based view. The default is `tree`."), @@ -121,7 +123,7 @@ const viewDescriptor: IJSONSchema = { ] }, id: { - description: localize('vscode.extension.contributes.view.id', 'Identifier of the view. This should be unique across all views. It is recommended to include your extension id as part of the view id. Use this to register a data provider through `vscode.window.registerTreeDataProviderForView` API. Also to trigger activating your extension by registering `onView:${id}` event to `activationEvents`.'), + markdownDescription: localize('vscode.extension.contributes.view.id', 'Identifier of the view. This should be unique across all views. It is recommended to include your extension id as part of the view id. Use this to register a data provider through `vscode.window.registerTreeDataProviderForView` API. Also to trigger activating your extension by registering `onView:${id}` event to `activationEvents`.'), type: 'string' }, name: {