Improve autocompletion for statusBar/remoteIndicator contribution point. Fixes #122566

This commit is contained in:
Martin Aeschlimann 2021-05-31 15:53:42 +02:00
parent efcf0eea9b
commit ae17cc9559
No known key found for this signature in database
GPG key ID: 2609A01E695523E3

View file

@ -23,6 +23,7 @@ interface IAPIMenu {
readonly description: string;
readonly proposed?: boolean; // defaults to false
readonly supportsSubmenus?: boolean; // defaults to true
readonly deprecationMessage?: string;
}
const apiMenus: IAPIMenu[] = [
@ -136,7 +137,8 @@ const apiMenus: IAPIMenu[] = [
id: MenuId.StatusBarWindowIndicatorMenu,
description: localize('menus.statusBarWindowIndicator', "The window indicator menu in the status bar"),
proposed: true,
supportsSubmenus: false
supportsSubmenus: false,
deprecationMessage: localize('menus.statusBarWindowIndicator.deprecated', "Use menu 'statusBar/remoteIndicator' instead."),
},
{
key: 'statusBar/remoteIndicator',
@ -423,6 +425,7 @@ namespace schema {
type: 'object',
properties: index(apiMenus, menu => menu.key, menu => ({
description: menu.proposed ? `(${localize('proposed', "Proposed API")}) ${menu.description}` : menu.description,
deprecationMessage: menu.deprecationMessage,
type: 'array',
items: menu.supportsSubmenus === false ? menuItem : { oneOf: [menuItem, submenuItem] }
})),