Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to programmatically make a TreeView visible

I'm trying to make a TreeView visible programmatically. The TreeView is empty.

I tried to call TreeView.reveal with a dummy TreeNode but it remains not visible. The only other method available on TreeView is "dispose". I don't see how I can have access to the "container" of this treeview as it is created using vscode.window.createTreeView(...). I searched on vscode.window API but not found anything related to my purpose.

How can I reveal/make the TreeView visible programmatically?

fakeNode = new TreeNode("dummyType", "dummyLabel", "dummyStatus", vscode.TreeItemCollapsibleState.Expanded);
myTreeView.reveal(fakeNode); 
expect(myTreeView.visible).to.be.true
like image 548
Aurélien Pupier Avatar asked Aug 08 '26 19:08

Aurélien Pupier


1 Answers

it is currently not possible. See https://github.com/microsoft/vscode/issues/90005 for a feature request. You can upvote the github issue to increase the probability to have it possible one day.

like image 80
Aurélien Pupier Avatar answered Aug 11 '26 11:08

Aurélien Pupier



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!