void (@NotNull Data data) { for (Data.Group group : data.groups) { List<FoldedBlock> blocks = new ArrayList<>(3); for (Data.Block block : group.blocks) { ContainerUtil.addIfNotNull(blocks, createBlock(data, block, myExpandSuggester.isExpanded(block))); } if (blocks.size() > 0) { FoldedGroup foldedGroup = new FoldedGroup(blocks); for (FoldedBlock folding : foldedGroup.blocks) { folding.installHighlighter(foldedGroup); } myFoldings.add(foldedGroup); } } }