-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathtreeUtils.ts
More file actions
25 lines (21 loc) · 1.03 KB
/
treeUtils.ts
File metadata and controls
25 lines (21 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { TreeItemIconPath } from '@microsoft/vscode-azext-utils';
import { Uri } from 'vscode';
import { ext } from '../extensionVariables';
export namespace treeUtils {
export function getIconPath(iconName: string): TreeItemIconPath {
return Uri.joinPath(getResourcesUri(), `${iconName}.svg`);
}
export function getThemedIconPath(iconName: string): TreeItemIconPath {
return {
light: Uri.joinPath(getResourcesUri(), 'light', `${iconName}.svg`),
dark: Uri.joinPath(getResourcesUri(), 'dark', `${iconName}.svg`)
};
}
function getResourcesUri(): Uri {
return Uri.joinPath(ext.context.extensionUri, 'resources');
}
}