You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable your extension to use proposed api by adding following flag to package.json
"enableProposedApi": true
Test the documentation of new TreeView API in vscode.proposed.d.ts
Now extension authors can programmatically reveal a node in the custom view using this API. This API needs your tree data provider to implement an additional method getParent.
Implement a tree data provider that has getParent method. Example here
Register the tree data provider using the proposed API that returns TreeView.
Implement and register a command that will call reveal API on the TreeView. See above example for reference.
Make sure that the requested node is shown in the view, when reveal is called on that node. By default revealed node is selected. You can reveal without selecting by passing appropriate options to reveal API.
Reveal API throws error if the data provider does not implement getParent method
Test revealing the node in following cases
When the node is loaded/seen by the user.
When the node is not loaded. This will call getParent method to load the parent chain of the node and reveal it.
When the view is collapsed
When the view is not shown aka a different viewlet is shown.
When the view is hidden using the context menu.
The text was updated successfully, but these errors were encountered:
Refs: #28974,
#32012,
#30288,
Complexity: 4
Write an extension that contributes a tree view to the Explorer. Refer to documentation and [samples] (https://github.com/Microsoft/vscode-extension-samples/tree/master/tree-view-sample).
Tree alignment
resourceUri
property onTreeItem
) and some are directly contributed.Tooltip
tooltip
property onTreeItem
. Test that tool tip is shown in the tree view when provided.reveal
proposed APIpackage.json
TreeView
API invscode.proposed.d.ts
getParent
.getParent
method. Example hereTreeView
.reveal
API on theTreeView
. See above example for reference.getParent
methodgetParent
method to load the parent chain of the node and reveal it.The text was updated successfully, but these errors were encountered: