rename view

Signed-off-by: Sanjula Ganepola <sanjulagane@gmail.com>
This commit is contained in:
Sanjula Ganepola
2024-09-24 23:50:41 -04:00
parent ecc5041e31
commit c6b960c60b
5 changed files with 9 additions and 9 deletions

View File

@@ -0,0 +1,24 @@
import { ThemeIcon, TreeItem, TreeItemCollapsibleState, Uri } from "vscode";
import { Component } from "../../types";
import { GithubLocalActionsTreeItem } from "../githubLocalActionsTreeItem";
export default class ComponentTreeItem extends TreeItem implements GithubLocalActionsTreeItem {
static contextValue = 'component';
component: Component;
constructor(component: Component) {
super(component.name, TreeItemCollapsibleState.Collapsed);
this.component = component;
this.collapsibleState = TreeItemCollapsibleState.None;
this.contextValue = ComponentTreeItem.contextValue;
this.iconPath = new ThemeIcon(component.icon);
this.resourceUri = Uri.parse(`${ComponentTreeItem.contextValue}:${component.name}?status=${component.status}`, true);
this.tooltip = `Name: ${component.name}\n` +
`Status: ${component.status}\n` +
(component.message ? `Message: ${component.message}` : ``);
}
async getChildren(): Promise<GithubLocalActionsTreeItem[]> {
return [];
}
}