Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Tree View

Add a custom tree view to the Explorer view container.

custom tree view

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.

VS Code API References

Below are references to parts of the API used in the code.

vscode module

Contribution Points

Running the Extension

  • Run npm install in 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.