void (@NotNull FoldRegion region, @NotNull MarkupModelEx markupModel, @NotNull List<? super RangeHighlighterEx> highlighters) { int startOffset = region.getStartOffset(); int endOffset = region.getEndOffset(); markupModel.processRangeHighlightersOverlappingWith(startOffset, endOffset, h -> { if (h.isVisibleIfFolded() && h.getAffectedAreaStartOffset() >= startOffset && h.getAffectedAreaEndOffset() <= endOffset) { highlighters.add(h); } return true; }); }