void (@NotNull List<? extends HighlightInfo> infos) { infos.sort((o1, o2) -> { int i = o1.startOffset - o2.startOffset; return i != 0 ? i : o1.getSeverity().myVal - o2.getSeverity().myVal; }); HighlightInfo prevInfo = null; for (Iterator<? extends HighlightInfo> it = infos.iterator(); it.hasNext();) { HighlightInfo info = it.next(); if (prevInfo != null && info.getSeverity() == HighlightInfoType.SYMBOL_TYPE_SEVERITY && info.getDescription() == null && info.startOffset == prevInfo.startOffset && info.endOffset == prevInfo.endOffset) { it.remove(); } prevInfo = info.type == HighlightInfoType.INJECTED_LANGUAGE_FRAGMENT ? info : null; } }