in intellij/src/main/kotlin/motif/intellij/hierarchy/ScopePropertyHierarchyBrowser.kt [118:129]
override fun configureTree(tree: Tree) {
super.configureTree(tree)
tree.addTreeSelectionListener {
val node: Any? = tree.lastSelectedPathComponent
if (node is DefaultMutableTreeNode) {
val descriptor: ScopeHierarchyNodeDescriptor =
node.userObject as? ScopeHierarchyNodeDescriptor ?: return@addTreeSelectionListener
val text: String? = descriptor.getLegend()
// TODO : display legend in a popup or dialog
}
}
}