Skip to content

Commit b9aa43a

Browse files
committed
fixes #100172
1 parent f69faf4 commit b9aa43a

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

src/vs/workbench/api/common/menusExtensionPoint.ts

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ namespace schema {
368368
};
369369

370370
export const submenusContribution: IJSONSchema = {
371-
description: localize('vscode.extension.contributes.submenus', "(Proposed API) Contributes submenu items to the editor"),
371+
description: localize('vscode.extension.contributes.submenus', "Contributes submenu items to the editor"),
372372
type: 'array',
373373
items: submenu
374374
};
@@ -585,11 +585,6 @@ submenusExtensionPoint.setHandler(extensions => {
585585
return;
586586
}
587587

588-
if (!extension.description.enableProposedApi) {
589-
collector.error(localize('submenu.proposedAPI.invalid', "Submenus are proposed API and are only available when running out of dev or with the following command line switch: --enable-proposed-api {0}", extension.description.identifier.value));
590-
return;
591-
}
592-
593588
let absoluteIcon: { dark: URI; light?: URI; } | ThemeIcon | undefined;
594589
if (entry.value.icon) {
595590
if (typeof entry.value.icon === 'string') {
@@ -638,7 +633,6 @@ menusExtensionPoint.setHandler(extensions => {
638633
}
639634

640635
let menu = _apiMenusByKey.get(entry.key);
641-
let isSubmenu = false;
642636

643637
if (!menu) {
644638
const submenu = _submenus.get(entry.key);
@@ -649,7 +643,6 @@ menusExtensionPoint.setHandler(extensions => {
649643
id: submenu.id,
650644
description: ''
651645
};
652-
isSubmenu = true;
653646
}
654647
}
655648

@@ -663,11 +656,6 @@ menusExtensionPoint.setHandler(extensions => {
663656
return;
664657
}
665658

666-
if (isSubmenu && !extension.description.enableProposedApi) {
667-
collector.error(localize('proposedAPI.invalid.submenu', "{0} is a submenu identifier and is only available when running out of dev or with the following command line switch: --enable-proposed-api {1}", entry.key, extension.description.identifier.value));
668-
return;
669-
}
670-
671659
for (const menuItem of entry.value) {
672660
let item: IMenuItem | ISubmenuItem;
673661

@@ -688,13 +676,8 @@ menusExtensionPoint.setHandler(extensions => {
688676

689677
item = { command, alt, group: undefined, order: undefined, when: undefined };
690678
} else {
691-
if (!extension.description.enableProposedApi) {
692-
collector.error(localize('proposedAPI.invalid.submenureference', "Menu item references a submenu which is only available when running out of dev or with the following command line switch: --enable-proposed-api {0}", extension.description.identifier.value));
693-
continue;
694-
}
695-
696679
if (menu.supportsSubmenus === false) {
697-
collector.error(localize('proposedAPI.unsupported.submenureference', "Menu item references a submenu for a menu which doesn't have submenu support."));
680+
collector.error(localize('unsupported.submenureference', "Menu item references a submenu for a menu which doesn't have submenu support."));
698681
continue;
699682
}
700683

0 commit comments

Comments
 (0)