question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't update the collapse state in the references-viewlet

See original GitHub issue

I’m developing extensions with the references-viewlet API and meet a problem. The API has only setInput() method to set the SymbolTreeInput of the reference view.

Since a TreeItem could keep the collapse state (if I understand correctly), if the new SymbolTreeInput contains some items the same as the previous one, and the user did some changes in these items about the collapse state such as expand or collapse, the collapse state will be preserved and not apply the state from the new SymbolTreeInput in the new reference viewlet, as the screenshot shows. ref

In the screenshot, I trigger setInput() to set a new SymbolTreeInput by clicking the menu Base on this type. In the new SymbolTreeInput, The collapse state of the item PetType is set to collapsed, but it doesn’t work.

It could be great if the references-viewlet API offers a method to dispose the treeView. Any other workaround would be appreciated.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jriekencommented, Jan 20, 2021

Yeah, tho request isn’t just about collapse/expand but more about reset the tree. Today, this can only be achieved by using a fake content provider that returns nothing before returning the actual contents

1reaction
jriekencommented, Jan 20, 2021

I understand the issue. What I am lacking (since this is just build against the TreeView-API) is a good way to reset/clear to tree. Maybe @alexr00 can help here

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remote explorer help section collapse state not remembered
Just connected to a remote (container): explorerOne ; Collapse help because I don't want help: explorerTwo ; After reload: explorerThree.
Read more >
NSSplitVIew - auto saving divider positions doesn't work with ...
I had to fall back on the solution provided by ElmerCat. ... Manage the 'hidden state' per view let hidden = NSString(string:components[4].lowercased()).
Read more >
Release notes for Azure Data Studio - Microsoft Learn
This article provides details about updates, improvements, and bug fixes for the current and previous versions of Azure Data Studio.
Read more >
CodeMirror 5 to 6 Migration Guide
Migration Guide. This guide provides rough translations of how various basic operations in the CodeMirror 5.x interface work with the new system.
Read more >
Space and Meaning – Tobias Bernard's GNOME Blog
Post Collapse Computing Part 3: Building Resilience · Part 1 of this series looks at the state of the climate crisis, and how...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found