Skip to content

Commit

Permalink
Improve views contribution point
Browse files Browse the repository at this point in the history
- add required properties
- add default snippet
- use `markdownDescription` for markdown string
  • Loading branch information
mjbvz committed Sep 10, 2020
1 parent f731c6f commit d82bb0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vs/workbench/api/browser/viewsExtensionPoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`."),
Expand All @@ -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: {
Expand Down

0 comments on commit d82bb0e

Please sign in to comment.