List<Block> () { final ArrayList<Block> result = new ArrayList<>(); ASTNode child = myNode.getFirstChildNode(); Indent currentIndent = getLabelIndent(); Wrap currentWrap = null; while (child != null) { if (!FormatterUtil.containsWhiteSpacesOnly(child) && child.getTextLength() > 0){ result.add(createJavaBlock(child, mySettings, myJavaSettings, currentIndent, currentWrap, AlignmentStrategy.getNullStrategy(), getFormattingMode())); if (child.getElementType() == JavaTokenType.COLON) { currentIndent = Indent.getNoneIndent(); currentWrap =Wrap.createWrap(WrapType.ALWAYS, true); } } child = child.getTreeNext(); } return result; }