void (int restrictStartOffset, int restrictEndOffset, @NotNull ProperTextRange priorityRange, @NotNull Collection<? super HighlightInfo> insideResult, @NotNull Collection<? super HighlightInfo> outsideResult, @NotNull TextAttributes attributes, @NotNull @NlsContexts.DetailedDescription String description, @NotNull @NlsContexts.Tooltip String tooltip, @NotNull TextRange range) { if (range.getStartOffset() >= restrictEndOffset || range.getEndOffset() <= restrictStartOffset) return; HighlightInfo info = HighlightInfo.newHighlightInfo(HighlightInfoType.TODO) .range(range) .textAttributes(attributes) .description(description) .escapedToolTip(tooltip) .createUnconditionally(); Collection<? super HighlightInfo> result = priorityRange.containsRange(info.getStartOffset(), info.getEndOffset()) ? insideResult : outsideResult; result.add(info); }