mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-19 17:58:39 +00:00
Finalize quickPickItemResource API proposal (#283877)
This commit is contained in:
@@ -34,7 +34,6 @@
|
||||
"portsAttributes",
|
||||
"quickInputButtonLocation",
|
||||
"quickPickSortByLabel",
|
||||
"quickPickItemResource",
|
||||
"resolvers",
|
||||
"scmActionButton",
|
||||
"scmSelectedProvider",
|
||||
|
||||
@@ -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',
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
|
||||
11
src/vscode-dts/vscode.d.ts
vendored
11
src/vscode-dts/vscode.d.ts
vendored
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user