void (@NotNull PsiElement value, final PsiReference @NotNull [] references, int start) { for (int i = start; i < references.length; ++i) { PsiReference reference = references[i]; ProgressManager.checkCanceled(); if (isUrlReference(reference)) continue; if (!hasBadResolve(reference, false)) { continue; } String description = getErrorDescription(reference); final int startOffset = reference.getElement().getTextRange().getStartOffset(); final TextRange referenceRange = reference.getRangeInElement(); // logging for IDEADEV-29655 if (referenceRange.getStartOffset() > referenceRange.getEndOffset()) { LOG.error("Reference range start offset > end offset: " + reference + ", start offset: " + referenceRange.getStartOffset() + ", end offset: " + referenceRange.getEndOffset()); } HighlightInfoType type = getTagProblemInfoType(PsiTreeUtil.getParentOfType(value, XmlTag.class)); if (value instanceof XmlAttributeValue) { PsiElement parent = value.getParent(); if (parent instanceof XmlAttribute) { String name = StringUtil.toLowerCase(((XmlAttribute)parent).getName()); if (type.getSeverity(null).compareTo(HighlightInfoType.WARNING.getSeverity(null)) > 0 && name.endsWith("stylename")) { type = HighlightInfoType.WARNING; } } } HighlightInfo.Builder builder = HighlightInfo.newHighlightInfo(type) .range(startOffset + referenceRange.getStartOffset(), startOffset + referenceRange.getEndOffset()) .descriptionAndTooltip(description); if (reference instanceof LocalQuickFixProvider) { LocalQuickFix[] fixes = ((LocalQuickFixProvider)reference).getQuickFixes(); if (fixes != null) { InspectionManager manager = InspectionManager.getInstance(reference.getElement().getProject()); for (LocalQuickFix fix : fixes) { ProblemDescriptor descriptor = manager.createProblemDescriptor(value, description, fix, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, true); builder.registerFix(new LocalQuickFixAsIntentionAdapter(fix, descriptor), null, null, null, null); } } } UnresolvedReferenceQuickFixUpdater.getInstance(value.getProject()).registerQuickFixesLater(reference, builder); myHolder.add(builder.create()); } }