Improve views contribution point

- add required properties
- add default snippet
- use `markdownDescription` for markdown string
This commit is contained in:
Matt Bierner 2020-09-10 11:28:24 -07:00
parent f731c6f2db
commit d82bb0ec77

View file

@ -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: {