void (@NotNull List<? extends Block> blocks, @NotNull List<? super DataLanguageBlockWrapper> before, @NotNull List<? super DataLanguageBlockWrapper> after, @NotNull TextRange bounds) { for (Block block : blocks) { final TextRange textRange = block.getTextRange(); if (bounds.contains(textRange)) { createAndAddBlock(before, block, null); } else if (bounds.getEndOffset() <= textRange.getStartOffset()) { createAndAddBlock(after, block, null); } else { //assert block.getSubBlocks().size() != 0 : "Block " + block.getTextRange() + " doesn't contain subblocks!"; splitByRightBoundAndCollectBlocks(block.getSubBlocks(), before, after, bounds); } } }