void (String actionID) { TreeUtil.promiseSelect(myActionsTree, new TreeVisitor() { @Override public @NotNull Action visit(@NotNull TreePath path) { Object obj2 = path.getLastPathComponent(); String userObjectString; if (obj2 instanceof DefaultMutableTreeNode) { Object obj = ((DefaultMutableTreeNode)obj2).getUserObject(); userObjectString = obj instanceof String ? (String)obj : null; } else { userObjectString = null; } if (userObjectString == null) { Object obj = path.getLastPathComponent(); Group group; if (obj instanceof DefaultMutableTreeNode) { Object obj1 = ((DefaultMutableTreeNode)obj).getUserObject(); group = obj1 instanceof Group ? (Group)obj1 : null; } else { group = null; } userObjectString = group == null ? null : group.getName(); } if (Objects.equals(userObjectString, actionID)) { TreeUtil.selectPath(myActionsTree, path); return Action.INTERRUPT; } return Action.CONTINUE; } }); }