diff --git a/src/vs/workbench/api/common/extHostQuickOpen.ts b/src/vs/workbench/api/common/extHostQuickOpen.ts index ab76d1881ba..edc8a951ffc 100644 --- a/src/vs/workbench/api/common/extHostQuickOpen.ts +++ b/src/vs/workbench/api/common/extHostQuickOpen.ts @@ -86,7 +86,6 @@ export function createExtHostQuickOpen(mainContext: IMainContext, workspace: IEx } const allowedTooltips = isProposedApiEnabled(extension, 'quickPickItemTooltip'); - const allowedIcons = isProposedApiEnabled(extension, 'quickPickItemIcon'); return itemsPromise.then(items => { @@ -101,10 +100,8 @@ export function createExtHostQuickOpen(mainContext: IMainContext, workspace: IEx if (item.tooltip && !allowedTooltips) { console.warn(`Extension '${extension.identifier.value}' uses a tooltip which is proposed API that is only available when running out of dev or with the following command line switch: --enable-proposed-api ${extension.identifier.value}`); } - if (item.iconPath && !allowedIcons) { - console.warn(`Extension '${extension.identifier.value}' uses an icon which is proposed API that is only available when running out of dev or with the following command line switch: --enable-proposed-api ${extension.identifier.value}`); - } - const icon = (item.iconPath && allowedIcons) ? getIconPathOrClass(item.iconPath) : undefined; + + const icon = (item.iconPath) ? getIconPathOrClass(item.iconPath) : undefined; pickItems.push({ label: item.label, iconPath: icon?.iconPath, @@ -573,7 +570,6 @@ export function createExtHostQuickOpen(mainContext: IMainContext, workspace: IEx }); const allowedTooltips = isProposedApiEnabled(this.extension, 'quickPickItemTooltip'); - const allowedIcons = isProposedApiEnabled(this.extension, 'quickPickItemIcon'); const pickItems: TransferQuickPickItemOrSeparator[] = []; for (let handle = 0; handle < items.length; handle++) { @@ -584,10 +580,8 @@ export function createExtHostQuickOpen(mainContext: IMainContext, workspace: IEx if (item.tooltip && !allowedTooltips) { console.warn(`Extension '${this.extension.identifier.value}' uses a tooltip which is proposed API that is only available when running out of dev or with the following command line switch: --enable-proposed-api ${this.extension.identifier.value}`); } - if (item.iconPath && !allowedIcons) { - console.warn(`Extension '${this.extension.identifier.value}' uses an icon which is proposed API that is only available when running out of dev or with the following command line switch: --enable-proposed-api ${this.extension.identifier.value}`); - } - const icon = (item.iconPath && allowedIcons) ? getIconPathOrClass(item.iconPath) : undefined; + + const icon = (item.iconPath) ? getIconPathOrClass(item.iconPath) : undefined; pickItems.push({ handle, label: item.label, diff --git a/src/vs/workbench/services/extensions/common/extensionsApiProposals.ts b/src/vs/workbench/services/extensions/common/extensionsApiProposals.ts index d42bf233a5c..323919fef7c 100644 --- a/src/vs/workbench/services/extensions/common/extensionsApiProposals.ts +++ b/src/vs/workbench/services/extensions/common/extensionsApiProposals.ts @@ -67,7 +67,6 @@ export const allApiProposals = Object.freeze({ portsAttributes: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.portsAttributes.d.ts', profileContentHandlers: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.profileContentHandlers.d.ts', quickDiffProvider: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.quickDiffProvider.d.ts', - quickPickItemIcon: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.quickPickItemIcon.d.ts', quickPickItemTooltip: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.quickPickItemTooltip.d.ts', quickPickSortByLabel: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.quickPickSortByLabel.d.ts', readonlyMessage: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.readonlyMessage.d.ts', diff --git a/src/vscode-dts/vscode.d.ts b/src/vscode-dts/vscode.d.ts index d819f00fa1c..cb147f92994 100644 --- a/src/vscode-dts/vscode.d.ts +++ b/src/vscode-dts/vscode.d.ts @@ -1733,6 +1733,11 @@ declare module 'vscode' { */ kind?: QuickPickItemKind; + /** + * The icon path or {@link ThemeIcon} for the QuickPickItem. + */ + iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon; + /** * A human-readable string which is rendered less prominent in the same line. Supports rendering of * {@link ThemeIcon theme icons} via the `$()`-syntax. diff --git a/src/vscode-dts/vscode.proposed.quickPickItemIcon.d.ts b/src/vscode-dts/vscode.proposed.quickPickItemIcon.d.ts deleted file mode 100644 index b53c8350117..00000000000 --- a/src/vscode-dts/vscode.proposed.quickPickItemIcon.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -declare module 'vscode' { - /** - * Represents an item that can be selected from - * a list of items. - */ - export interface QuickPickItem { - /** - * The icon path or {@link ThemeIcon} for the QuickPickItem. - */ - iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon; - } -}