Action (@NotNull TreePath path) { if (!isValidModel()) { return Action.SKIP_SIBLINGS; } if (path.equals(pathToActUpon)) { return Action.INTERRUPT; } else if (path.isDescendant(pathToActUpon)) { return Action.CONTINUE; } else { return Action.SKIP_CHILDREN; } }