B:BD[
6.574] → [
6.574:826]
B:BD[
6.861] → [
6.861:868]
getTreeItem (element: PijulChannel): TreeItem | Thenable<TreeItem> {
return {
id: element.name,
label: element.name,
description: element.isCurrent ? 'Current' : undefined,
collapsibleState: TreeItemCollapsibleState.None,
// Different context menu options for current and inactive channels
contextValue: 'pijulChannel' + (element.isCurrent ? 'Current' : '')
};
getTreeItem (element: PijulChannel | PijulChange): TreeItem | Thenable<TreeItem> {
if (element instanceof PijulChannel) {
return {
id: element.name,
label: element.name,
description: element.isCurrent ? 'Current' : undefined,
collapsibleState: element.isCurrent ? TreeItemCollapsibleState.None : TreeItemCollapsibleState.Collapsed,
// Different context menu options for current and inactive channels
contextValue: 'pijulChannel' + (element.isCurrent ? 'Current' : '')
};
} else {
return {
label: element.message,
description: `${element.author.name}, ${element.date.toISOString()}`,
collapsibleState: TreeItemCollapsibleState.None,
contextValue: 'pijulChange',
tooltip: `${element.hash}\nRecorded by ${element.author.fullName ?? element.author.name} at ${element.date.toISOString()}\n\n\t${element.message}\n`,
command: {
command: 'vscode.open',
title: 'Open Change TOML',
arguments: [Uri.parse('pijul-change:' + element.hash)]
}
};
}