Add a custom tree view to the Explorer view container.
The tree view displays an array of users. Each property of position is treated as a child tree item.
let users = [
{
firstName: "John",
lastName: "Doe",
position: { name: "Manager", level: "3" },
},
{
firstName: "Jane",
lastName: "Doe",
position: { name: "Backend Engineer", level: "2" },
},
]The code uses the onStartupFinished ActivationEvent to show the treeview as soon as VS Code starts.
Below are references to parts of the API used in the code.
- Run
npm installin terminal to install dependencies. - Press F5 to run the "Launch Extension" Debug Configuration. This will run the extension in a new VS Code window.
- The tree view will be visible as soon as the extension is loaded.
