-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathrevealTreeItem.ts
More file actions
16 lines (14 loc) · 984 Bytes
/
revealTreeItem.ts
File metadata and controls
16 lines (14 loc) · 984 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { AzExtTreeItem, callWithTelemetryAndErrorHandling, IActionContext } from "@microsoft/vscode-azext-utils";
import { ext } from "../../extensionVariables";
export async function revealTreeItem(resourceId: string): Promise<void> {
return await callWithTelemetryAndErrorHandling('api.revealTreeItem', async (context: IActionContext) => {
const node: AzExtTreeItem | undefined = await ext.rgApi.appResourceTree.findTreeItem(resourceId, { ...context, loadAll: true });
if (node) {
await ext.rgApi.appResourceTreeView.reveal(node, { select: true, focus: true, expand: true });
}
});
}