Files
vscode-extension-samples/tree-view-sample
Matt Bierner 0b26276bb6 Use vscode/@types for most extension samples
Fixes #180

Changes from using `vscode` to `@types/vscode` for the majority of extension samples. The `@types/vscode` package is much smaller and does not pull in any dependencies.

Other changes:

- Remove so empty test files
- Bump engine versions to match @types/vscode versions
- Use `npm run compile` for most `vscode:prepublish` scripts
2019-05-09 14:52:38 -07:00
..
2017-06-02 14:27:05 +02:00
2018-11-19 12:17:15 +01:00
2017-06-02 14:27:05 +02:00
2017-06-02 14:27:05 +02:00
2018-10-29 19:11:51 +01:00
2018-10-29 19:11:51 +01:00
2018-10-29 19:11:51 +01:00

Views & View Containers

This sample demonstrates how to implement and contribute a tree view in VS Code. This includes:

  • Contributing views and view containers.
  • Contributing actions in various location of the view.
  • Implementing the tree data provider for the view.
  • Creating and working with the view.

This sample provides following views

  • Node dependencies view
  • Ftp file explorer view

Following example shows Node dependencies view in Package Explorer View container.

Package Explorer

VS Code API

This sample uses following contribution points, activation events and APIs

Contribution Points

  • views
  • viewContainers
  • menu
    • view/title
    • view/item/context

Activation Events

  • onView:${viewId}

APIs

  • window.createTreeView
  • window.registerTreeDataProvider
  • TreeView
  • TreeDataProvider

Refer to Usage document for more details.

Running the Sample

  • Open this example in VS Code Insiders
  • npm install
  • npm run watch
  • F5 to start debugging
  • Node dependencies view is shown in Package explorer view container in Activity bar.
  • FTP file explorer view should be shown in Explorer