It turns out, VS Code has a whole library of built-in icons that you can reference with a $(icon-name) format in package.json and with iconPath = new vscode.ThemeIcon("icon-name"). Here's the icon reference: https://code.visualstudio.com/api/references/icons-in-labels
Since we have these built-in icons, I deleted all the icon files from the Node Dependencies tutorial we followed.
Accomplishment 2 -- I found out how to make icons show up on the tree items
Also, I added a property called this.contextValue to the tree view items to use in the when: clause in package.json
I set this value so we could distinguish between top-level ClearmlSession tree items, and their children... which are just vanilla vscode.TreeItems. This way, only the top-level TreeItems get the play button, and the "detail TreeItems" nested underneath have a "Copy to Clipboard" button.
Accomplishment 1 -- I found out how to use icons
It turns out, VS Code has a whole library of built-in icons that you can reference with a
$(icon-name)
format inpackage.json
and withiconPath = new vscode.ThemeIcon("icon-name")
. Here's the icon reference: https://code.visualstudio.com/api/references/icons-in-labelsSince we have these built-in icons, I deleted all the icon files from the Node Dependencies tutorial we followed.
Accomplishment 2 -- I found out how to make icons show up on the tree items
Also, I added a property called
this.contextValue
to the tree view items to use in thewhen:
clause inpackage.json
I set this value so we could distinguish between top-level
ClearmlSession
tree items, and their children... which are just vanillavscode.TreeItem
s. This way, only the top-level TreeItems get the play button, and the "detail TreeItems" nested underneath have a "Copy to Clipboard" button.