void (@NotNull AnActionEvent e) { TreePath path = myHierarchyTree.getLeadSelectionPath(); if (path == null) return; HierarchyTree.ComponentNode node = ObjectUtils.tryCast(path.getLastPathComponent(), HierarchyTree.ComponentNode.class); if (node == null) return; JComponent c = UIUtil.getParentOfType(JComponent.class, node.getComponent()); if (c == null) return; new DataContextDialog(myProject, c).show(); }