diff --git a/extensions/vscode-api-tests/package.json b/extensions/vscode-api-tests/package.json index e7eacadec2e..3f586a847ea 100644 --- a/extensions/vscode-api-tests/package.json +++ b/extensions/vscode-api-tests/package.json @@ -34,7 +34,6 @@ "portsAttributes", "quickInputButtonLocation", "quickPickSortByLabel", - "quickPickItemResource", "resolvers", "scmActionButton", "scmSelectedProvider", diff --git a/src/vs/platform/extensions/common/extensionsApiProposals.ts b/src/vs/platform/extensions/common/extensionsApiProposals.ts index 959b3477de4..00ac167445e 100644 --- a/src/vs/platform/extensions/common/extensionsApiProposals.ts +++ b/src/vs/platform/extensions/common/extensionsApiProposals.ts @@ -334,9 +334,6 @@ const _allApiProposals = { quickInputButtonLocation: { proposal: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.quickInputButtonLocation.d.ts', }, - quickPickItemResource: { - proposal: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.quickPickItemResource.d.ts', - }, quickPickItemTooltip: { proposal: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.quickPickItemTooltip.d.ts', }, diff --git a/src/vs/workbench/api/common/extHostQuickOpen.ts b/src/vs/workbench/api/common/extHostQuickOpen.ts index ef3f5503ed3..3cff3d072d3 100644 --- a/src/vs/workbench/api/common/extHostQuickOpen.ts +++ b/src/vs/workbench/api/common/extHostQuickOpen.ts @@ -102,10 +102,6 @@ export function createExtHostQuickOpen(mainContext: IMainContext, workspace: IEx checkProposedApiEnabled(extension, 'quickPickItemTooltip'); } - if (item.resourceUri) { - checkProposedApiEnabled(extension, 'quickPickItemResource'); - } - pickItems.push({ label: item.label, iconPathDto: IconPath.from(item.iconPath), @@ -576,10 +572,6 @@ export function createExtHostQuickOpen(mainContext: IMainContext, workspace: IEx checkProposedApiEnabled(this._extension, 'quickPickItemTooltip'); } - if (item.resourceUri) { - checkProposedApiEnabled(this._extension, 'quickPickItemResource'); - } - pickItems.push({ handle, label: item.label, diff --git a/src/vscode-dts/vscode.d.ts b/src/vscode-dts/vscode.d.ts index 100950c6648..d4eb6321a9d 100644 --- a/src/vscode-dts/vscode.d.ts +++ b/src/vscode-dts/vscode.d.ts @@ -1938,6 +1938,17 @@ declare module 'vscode' { */ detail?: string; + /** + * A {@link Uri} representing the resource associated with this item. + * + * When set, this property is used to automatically derive several item properties if they are not explicitly provided: + * - **Label**: Derived from the resource's file name when {@link QuickPickItem.label label} is not provided or is empty. + * - **Description**: Derived from the resource's path when {@link QuickPickItem.description description} is not provided or is empty. + * - **Icon**: Derived from the current file icon theme when {@link QuickPickItem.iconPath iconPath} is set to + * {@link ThemeIcon.File} or {@link ThemeIcon.Folder}. + */ + resourceUri?: Uri; + /** * Optional flag indicating if this item is initially selected. * diff --git a/src/vscode-dts/vscode.proposed.quickPickItemResource.d.ts b/src/vscode-dts/vscode.proposed.quickPickItemResource.d.ts deleted file mode 100644 index dd763a23e56..00000000000 --- a/src/vscode-dts/vscode.proposed.quickPickItemResource.d.ts +++ /dev/null @@ -1,22 +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' { - - // https://github.com/microsoft/vscode/issues/59826 - - export interface QuickPickItem { - /** - * A {@link Uri} representing the resource associated with this item. - * - * When set, this property is used to automatically derive several item properties if they are not explicitly provided: - * - **Label**: Derived from the resource's file name when {@link QuickPickItem.label label} is not provided or is empty. - * - **Description**: Derived from the resource's path when {@link QuickPickItem.description description} is not provided or is empty. - * - **Icon**: Derived from the current file icon theme when {@link QuickPickItem.iconPath iconPath} is set to - * {@link ThemeIcon.File} or {@link ThemeIcon.Folder}. - */ - resourceUri?: Uri; - } -}