ASTNode (final List<? super Block> result, ASTNode child, final Alignment childAlignment, final Wrap childWrap, final Indent indent) { final List<Block> localResult = new ArrayList<>(); processChild(localResult, child, AlignmentStrategy.getNullStrategy(), null, Indent.getNoneIndent()); child = child.getTreeNext(); Indent childIndent = Indent.getNormalIndent(); while (child != null) { if (child.getElementType() == JavaElementType.SWITCH_LABEL_STATEMENT || isRBrace(child)) { result.add(createCaseSectionBlock(localResult, childAlignment, indent, childWrap)); return child.getTreePrev(); } if (!FormatterUtil.containsWhiteSpacesOnly(child)) { if (child.getElementType() == JavaElementType.BLOCK_STATEMENT) { childIndent = Indent.getNoneIndent(); } boolean breakOrReturn = isBreakOrReturn(child); processChild(localResult, child, AlignmentStrategy.getNullStrategy(), null, childIndent); if (breakOrReturn) { result.add(createCaseSectionBlock(localResult, childAlignment, indent, childWrap)); return child; } } child = child.getTreeNext(); } result.add(createCaseSectionBlock(localResult, childAlignment, indent, childWrap)); return null; }