提交 7e23ca4a 编写于 作者: S Sandeep Somavarapu

API: Add resourceUri property to TreeItem

上级 1f064796
...@@ -4963,15 +4963,20 @@ declare module 'vscode' { ...@@ -4963,15 +4963,20 @@ declare module 'vscode' {
export class TreeItem { export class TreeItem {
/** /**
* A human-readable string describing this item * A human-readable string describing this item. When `falsy`, it is derived from [resourceUri](#TreeItem.resourceUri).
*/ */
label: string; label?: string;
/** /**
* The icon path for the tree item * The icon path for the tree item. When `falsy`, it is derived from [resourceUri](#TreeItem.resourceUri).
*/ */
iconPath?: string | Uri | { light: string | Uri; dark: string | Uri }; iconPath?: string | Uri | { light: string | Uri; dark: string | Uri };
/**
* The [uri](#Uri) of the resource representing this item.
*/
resourceUri?: Uri;
/** /**
* The [command](#Command) which should be run when the tree item is selected. * The [command](#Command) which should be run when the tree item is selected.
*/ */
...@@ -5007,6 +5012,12 @@ declare module 'vscode' { ...@@ -5007,6 +5012,12 @@ declare module 'vscode' {
* @param collapsibleState [TreeItemCollapsibleState](#TreeItemCollapsibleState) of the tree item. Default is [TreeItemCollapsibleState.None](#TreeItemCollapsibleState.None) * @param collapsibleState [TreeItemCollapsibleState](#TreeItemCollapsibleState) of the tree item. Default is [TreeItemCollapsibleState.None](#TreeItemCollapsibleState.None)
*/ */
constructor(label: string, collapsibleState?: TreeItemCollapsibleState); constructor(label: string, collapsibleState?: TreeItemCollapsibleState);
/**
* @param resourceUri The [uri](#Uri) of the resource representing this item.
* @param collapsibleState [TreeItemCollapsibleState](#TreeItemCollapsibleState) of the tree item. Default is [TreeItemCollapsibleState.None](#TreeItemCollapsibleState.None)
*/
constructor(resourceUri: Uri, collapsibleState?: TreeItemCollapsibleState);
} }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册