My goal is to create a TreeView using data from a JSON file or REST call, with custom icons for each type of object (Server, Host, and Group). I want to implement configuration.menu similar to the dynamic context menu discussed in this thread.
I am relatively new to building VS Code extensions. While I have made some attempts by modifying the constructor() method and tinkering with the TreeItem class, I still struggle with understanding how to fully achieve the desired behavior.
Here is a snippet of my current code:
// Code snippet here
// More code here
The expected outcome is displayed below without the icon and menu features: TreeView displayed using hard-coded json
Below is a JSON sample that I am referring to. Any suggestions on improving the format would be appreciated.
{
"inventory": {
"servers": [
{
"server": "abcd",
// More server details here
},
{
"server": "1234",
// Additional server information
"nodes": null
}
]
}
}
Thank you for your assistance with this task.