Files
vscode-extension-samples/tree-view-sample/README.md

52 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2018-05-31 11:51:59 +02:00
# Views & View Containers
2018-10-25 18:28:48 +02:00
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
2016-11-16 09:33:20 -08:00
2017-06-02 10:46:57 +02:00
- Node dependencies view
- Ftp file explorer view
2016-11-16 09:33:20 -08:00
2018-10-25 18:28:48 +02:00
Following example shows Node dependencies view in Package Explorer View container.
2018-05-31 11:51:59 +02:00
![Package Explorer](./resources/package-explorer.png)
2018-10-25 18:28:48 +02:00
## VS Code API
This sample uses following contribution points, activation events and APIs
### Contribution Points
- `views`
- `viewsContainers`
2018-10-25 18:28:48 +02:00
- `menu`
- `view/title`
- `view/item/context`
2018-10-25 18:28:48 +02:00
### Activation Events
- `onView:${viewId}`
### APIs
- `window.createTreeView`
- `window.registerTreeDataProvider`
- `TreeView`
- `TreeDataProvider`
Refer to [Usage](./USAGE.md) document for more details.
## Running the Sample
2016-11-16 09:33:20 -08:00
2018-03-20 07:49:39 +00:00
- Open this example in VS Code Insiders
2016-11-16 09:33:20 -08:00
- `npm install`
2018-07-24 17:15:39 +02:00
- `npm run watch`
- `F5` to start debugging
2018-05-31 11:51:59 +02:00
- Node dependencies view is shown in Package explorer view container in Activity bar.
- FTP file explorer view should be shown in Explorer