void (AnnotationHolder holder, QNameElement element, ContextProvider myProvider) { final PsiReference[] references = element.getReferences(); for (PsiReference reference : references) { if (reference instanceof PrefixReference pr) { if (!pr.isSoft() && pr.isUnresolved()) { final TextRange range = pr.getRangeInElement().shiftRight(pr.getElement().getTextRange().getStartOffset()); AnnotationBuilder builder = holder.newAnnotation(HighlightSeverity.ERROR, XPathBundle.message("annotator.error.unresolved.namespace.prefix", pr.getCanonicalText())).range(range) .highlightType(ProblemHighlightType.LIKE_UNKNOWN_SYMBOL); final NamespaceContext namespaceContext = myProvider.getNamespaceContext(); final PrefixedName qName = element.getQName(); if (namespaceContext != null && qName != null) { final IntentionAction[] fixes = namespaceContext.getUnresolvedNamespaceFixes(reference, qName.getLocalName()); for (IntentionAction fix : fixes) { builder = builder.withFix(fix); } } builder.create(); } } } }