Skip to content

Test: Tree API #27467

Closed
Closed

Description

Test for #26948

Complexity: 4

What to do - Code :)

Write an extension that contributes a tree view to the Explorer using following steps

Prerequisites

  • Copy vscode.proposed.d.ts into your extension.
  • Enable your extension to use proposed api by adding following flag to package.json
"enableProposedApi": true

  1. Contribute a view using the extension point views.
  2. Implement and register a tree data provider to this contributed view using the API. API should be self explanatory.

Activation

  • Extension can be made activated on activation event onView:${id}.

Menus

Contribute commands using menus extension point at following locations

  • view/title - Supported groups are navigation.
  • view/item/context - No groups are supported. These commands will be called with your model element representing tree item as first argument.
  • Context keys to represent view and view items in when clause are view and viewItem respectively.

Examples here

What to Test ?

  1. Make sure that the tree view is shown in the explorer. Validate the tree by navigating down.
  2. Make sure the extension is activated only when you expanded the view.
  3. Make sure the command provided for tree item is called when the tree item is selected.
  4. Make sure actions on title bar and on item are shown and called.
  5. Make sure the view collapsible state and size is restored on refresh.

Play around and please provide feedback on the api and issues all through this repository.

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions