void (@NotNull AnActionEvent e) { final Component component = e.getData(PlatformCoreDataKeys.CONTEXT_COMPONENT); if (component instanceof JTree tree) { final int[] selection = tree.getSelectionRows(); if (selection != null && selection.length > 0) { TreeUtil.showRowCentered(tree, selection [0], false); } } }