in intellij/src/main/kotlin/motif/intellij/hierarchy/ScopeHierarchyBrowser.kt [157:168]
override fun configureTree(tree: Tree) {
super.configureTree(tree)
tree.addTreeSelectionListener {
val node: Any? = tree.lastSelectedPathComponent
if (node is DefaultMutableTreeNode) {
val descriptor = node.userObject
if (descriptor is ScopeHierarchyScopeDescriptor) {
selectionListener?.onSelectedScopeChanged(descriptor.element, descriptor.scope)
}
}
}
}