void (@NotNull PsiElement element, @NotNull AnnotationHolder holder) { if (holder.isBatchMode()) return; for (PsiHighlightedReference reference : PsiSymbolReferenceService.getService().getReferences(element, PsiHighlightedReference.class)) { TextRange range = reference.getAbsoluteRange(); String message = reference.highlightMessage(); AnnotationBuilder annotationBuilder = message == null ? holder.newSilentAnnotation(reference.highlightSeverity()) : holder.newAnnotation(reference.highlightSeverity(), message); reference.highlightReference(annotationBuilder.range(range)).create(); } if (WebReference.isWebReferenceWorthy(element)) { annotateContributedReferences(element, holder); } }