diff --git a/src/vs/workbench/api/browser/viewsExtensionPoint.ts b/src/vs/workbench/api/browser/viewsExtensionPoint.ts index fda5c018445..fbeeb50326f 100644 --- a/src/vs/workbench/api/browser/viewsExtensionPoint.ts +++ b/src/vs/workbench/api/browser/viewsExtensionPoint.ts @@ -406,7 +406,7 @@ class ViewsExtensionHandler implements IWorkbenchContribution { } if (entry.key === 'remote' && !isProposedApiEnabled(extension.description, 'contribViewsRemote')) { - collector.warn(localize('ViewContainerRequiresProposedAPI', "View container '{0}' requires 'enableProposedApi' turned on to be added to 'Remote'.", entry.key)); + collector.warn(localize('ViewContainerRequiresProposedAPI', "View container '{0}' requires 'enabledApiProposals: [\"contribViewsRemote\"]' to be added to 'Remote'.", entry.key)); return; } diff --git a/src/vs/workbench/api/common/menusExtensionPoint.ts b/src/vs/workbench/api/common/menusExtensionPoint.ts index 36a97b077cb..6f7fb8389ca 100644 --- a/src/vs/workbench/api/common/menusExtensionPoint.ts +++ b/src/vs/workbench/api/common/menusExtensionPoint.ts @@ -750,7 +750,7 @@ menusExtensionPoint.setHandler(extensions => { } if (menu.proposed && !isProposedApiEnabled(extension.description, menu.proposed)) { - collector.error(localize('proposedAPI.invalid', "{0} is a proposed menu 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)); + collector.error(localize('proposedAPI.invalid', "{0} is a proposed menu identifier. It requires 'package.json#enabledApiProposals: [\"{1}\"]' and is only available when running out of dev or with the following command line switch: --enable-proposed-api {2}", entry.key, menu.proposed, extension.description.identifier.value)); return; } diff --git a/src/vs/workbench/contrib/welcome/common/viewsWelcomeContribution.ts b/src/vs/workbench/contrib/welcome/common/viewsWelcomeContribution.ts index adc14db0b19..91f6b79e2e5 100644 --- a/src/vs/workbench/contrib/welcome/common/viewsWelcomeContribution.ts +++ b/src/vs/workbench/contrib/welcome/common/viewsWelcomeContribution.ts @@ -74,7 +74,7 @@ function parseGroupAndOrder(welcome: ViewWelcome, contribution: IExtensionPointU let order: number | undefined; if (welcome.group) { if (!isProposedApiEnabled(contribution.description, 'contribViewsWelcome')) { - contribution.collector.warn(nls.localize('ViewsWelcomeExtensionPoint.proposedAPI', "The viewsWelcome contribution in '{0}' requires 'enableProposedApi' to be enabled, in order to use the 'group' proposed property.", contribution.description.identifier.value)); + contribution.collector.warn(nls.localize('ViewsWelcomeExtensionPoint.proposedAPI', "The viewsWelcome contribution in '{0}' requires 'enabledApiProposals: [\"contribViewsWelcome\"]' in order to use the 'group' proposed property.", contribution.description.identifier.value)); return { group, order }; } diff --git a/src/vs/workbench/services/extensions/common/extensions.ts b/src/vs/workbench/services/extensions/common/extensions.ts index 3ef6cdd288e..5eccd39dc01 100644 --- a/src/vs/workbench/services/extensions/common/extensions.ts +++ b/src/vs/workbench/services/extensions/common/extensions.ts @@ -143,7 +143,7 @@ export function isProposedApiEnabled(extension: IExtensionDescription, proposal: export function checkProposedApiEnabled(extension: IExtensionDescription, proposal: ApiProposalName): void { if (!isProposedApiEnabled(extension, proposal)) { - throw new Error(`[${extension.identifier.value}]: Proposed API is only available when running out of dev or with the following command line switch: --enable-proposed-api ${extension.identifier.value}`); + throw new Error(`Extension '${extension.identifier.value}' CANNOT use API proposal: ${proposal}.\nAccording to its package.json#enabledApiProposals-property it wants: ${extension.enabledApiProposals?.join(', ') ?? ''}.\n You MUST start in extension development mode or use the following command line switch: --enable-proposed-api ${extension.identifier.value}`); } } diff --git a/src/vs/workbench/services/themes/common/iconExtensionPoint.ts b/src/vs/workbench/services/themes/common/iconExtensionPoint.ts index 67bd0f3f868..b7d60683e0b 100644 --- a/src/vs/workbench/services/themes/common/iconExtensionPoint.ts +++ b/src/vs/workbench/services/themes/common/iconExtensionPoint.ts @@ -127,7 +127,7 @@ export class IconExtensionPoint { const collector = extension.collector; if (!isProposedApiEnabled(extension.description, 'contribIcons')) { - collector.error(nls.localize('invalid.icons.proposedAPI', "'configuration.icons is a proposed contribution point and only available when running out of dev or with the following command line switch: --enable-proposed-api {0}", extension.description.identifier.value)); + collector.error(nls.localize('invalid.icons.proposedAPI', "'configuration.icons is a proposed contribution point. It requires 'package.json#enabledApiProposals: [\"contribIcons\"]' and is only available when running out of dev or with the following command line switch: --enable-proposed-api {0}", extension.description.identifier.value)); return; } @@ -181,7 +181,7 @@ export class IconFontExtensionPoint { const collector = extension.collector; if (!isProposedApiEnabled(extension.description, 'contribIconFonts')) { - collector.error(nls.localize('invalid.iconFonts.proposedAPI', "'configuration.iconFonts is a proposed contribution point and only available when running out of dev or with the following command line switch: --enable-proposed-api {0}", extension.description.identifier.value)); + collector.error(nls.localize('invalid.iconFonts.proposedAPI', "'configuration.iconFonts is a proposed contribution point. It requires 'package.json#enabledApiProposals: [\"contribIconFonts\"]' and is and only available when running out of dev or with the following command line switch: --enable-proposed-api {0}", extension.description.identifier.value)); return; }