void (XPathVariableReference reference, AnnotationHolder holder) { final String referencedName = reference.getReferencedName(); // missing name is already flagged by parser if (referencedName.length() > 0) { final TextRange range = reference.getTextRange().shiftRight(1).grown(-1); AnnotationBuilder builder = holder.newAnnotation(HighlightSeverity.ERROR, XPathBundle.message("annotator.error.unresolved.variable", referencedName)) .range(range) .highlightType(ProblemHighlightType.LIKE_UNKNOWN_SYMBOL); final VariableContext variableContext = ContextProvider.getContextProvider(reference).getVariableContext(); if (variableContext != null) { final IntentionAction[] fixes = variableContext.getUnresolvedVariableFixes(reference); for (IntentionAction fix : fixes) { builder = builder.withFix(fix); } } builder.create(); } }