ASTNode (@NotNull final List<? super Block> result, ASTNode child, @NotNull final AlignmentStrategy alignmentStrategy, final Wrap defaultWrap, final Indent childIndent) { ASTNode lastFieldInGroup = findLastFieldInGroup(child); if (lastFieldInGroup == child) { Wrap wrap = arrangeChildWrap(child, defaultWrap); result.add(createJavaBlock(child, getSettings(), myJavaSettings, childIndent, wrap, alignmentStrategy, myFormattingMode)); return child; } else { List<Block> localResult = new ArrayList<>(); while (child != null) { if (!FormatterUtil.containsWhiteSpacesOnly(child)) { localResult.add(createJavaBlock( child, getSettings(), myJavaSettings, Indent.getContinuationWithoutFirstIndent(myIndentSettings.USE_RELATIVE_INDENTS), arrangeChildWrap(child, defaultWrap), alignmentStrategy, myFormattingMode ) ); } if (child == lastFieldInGroup) break; child = child.getTreeNext(); } if (!localResult.isEmpty()) { result.add(new SyntheticCodeBlock(localResult, null, getSettings(), myJavaSettings, childIndent, null)); } return lastFieldInGroup; } }