Action (@NotNull TreePath path, @NotNull TreeVisitor.Action action) { if (action == TreeVisitor.Action.CONTINUE || action == TreeVisitor.Action.INTERRUPT) { // do not expand children if parent path is collapsed if (!tree.isVisible(path)) { if (!promise.isCancelled()) { if (LOG.isTraceEnabled()) LOG.debug("tree expand canceled"); promise.cancel(); } return TreeVisitor.Action.SKIP_SIBLINGS; } if (action == TreeVisitor.Action.CONTINUE) expandPathWithDebug(tree, path); } return action; }