boolean (@NotNull PsiElement element, @NotNull AnnotationHolder holder, @NotNull List<PsiReference> references) { boolean hasUnprocessedReferences = false; for (PsiReference reference : references) { if (reference instanceof WebReference) { String message = holder.getCurrentAnnotationSession().getUserData(messageKey); if (message == null) { message = getMessage(); holder.getCurrentAnnotationSession().putUserData(messageKey, message); } TextRange range = reference.getRangeInElement().shiftRight(element.getTextRange().getStartOffset()); holder.newAnnotation(HighlightSeverity.INFORMATION, message) .range(range) .textAttributes(CodeInsightColors.INACTIVE_HYPERLINK_ATTRIBUTES) .create(); } else if (reference instanceof HighlightedReference) { if (reference.isSoft() && !((HighlightedReference)reference).isHighlightedWhenSoft()) continue; TextRange rangeInElement = reference.getRangeInElement(); if (rangeInElement.isEmpty()) continue; TextRange range = rangeInElement.shiftRight(element.getTextRange().getStartOffset()); holder.newSilentAnnotation(HighlightInfoType.HIGHLIGHTED_REFERENCE_SEVERITY) .range(range) .textAttributes(DefaultLanguageHighlighterColors.HIGHLIGHTED_REFERENCE) .create(); } else { hasUnprocessedReferences = true; } } return hasUnprocessedReferences; }