I implemented a structure view in my custom language plugin, but I have two questions related to this:
- my StructureViewModel implements StructureViewModel.ExpandInfoProvider to automatically collapse certains nodes, but why does it only work in the structure tool window, not the popup?
- how can I add more than one color in a StructureViewTreeElement's label? It seems that PresentationData supports it via its myColoredText attribute, but it's never populated in PresentationData.updateFrom(ItemPresentation presentation)
For the second question, it seems that the only way to achieve this is to create a whole new component for the structure view, I didn't find any way to override TreeElementWrapper#update(PresentationData presentation).
Perhaps you could add a method named getColoredFragments() in ColoredItemPresentation, or add a new interface like ColoredFragmentAware, and handle this change in PresentationData.updateFrom(ItemPresentation presentation) ?