void (final Block block, int indent, final StringBuilder builder) { if (indent == 0) { builder.append("--- FORMATTING MODEL ---\n"); } builder.append(StringUtil.repeatSymbol(' ', indent)); List<Block> subBlocks = block.getSubBlocks(); if (subBlocks.isEmpty()) { dumpTextBlock(block, builder); } else { dumpBlock(block, builder); Block prevBlock = null; for(Block subBlock: subBlocks) { if (prevBlock != null) { Spacing spacing = block.getSpacing(prevBlock, subBlock); if (spacing != null) { dumpSpacing(spacing, indent+2, builder); } } prevBlock = subBlock; dumpFormattingModel(subBlock, indent+2, builder); } } }