Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: Tree API #27467

Closed
3 tasks done
sandy081 opened this issue May 29, 2017 · 0 comments
Closed
3 tasks done

Test: Tree API #27467

sandy081 opened this issue May 29, 2017 · 0 comments
Assignees
Milestone

Comments

@sandy081
Copy link
Member

sandy081 commented May 29, 2017

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants