Auto Expand Custom Structure View



I'm making a plugin which has a custom Structure View,, and to do this I create a new instance of  com.intellij.ide.structureView.newStructureView.StructureViewComponent and pass in the appropriate elements.

The tree renders, however every node has the ability to be expanded, even if it doesn't have children. I have tried using StructureViewComponent.getTree() and expanding all the rows using the JBTree API, and also tried visiting all the elements and trying to use StructureViewComponent.expandPathToElement() passing in every PsiElement in the tree using a visitor, and that doesn't work.



1 comment
Comment actions Permalink

Please see com.intellij.ide.structureView.StructureViewModel.ElementInfoProvider and com.intellij.ide.structureView.StructureViewModel.ExpandInfoProvider to control (auto-)expansion


Please sign in to leave a comment.