Can't update the collapse state in the references-viewlet
See original GitHub issueI’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.
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:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
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
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