void (AnnotationHolder annotationHolder, PsiFile file) { final XPathExpression expression = ((XPathFile)file).getExpression(); if (expression != null) { if (!checkPattern(expression)) { annotationHolder.newAnnotation(HighlightSeverity.ERROR, XPathBundle.message("annotator.error.bad.pattern")).range(expression).create(); } } else { annotationHolder.newAnnotation(HighlightSeverity.ERROR, XPathBundle.message("annotator.error.missing.pattern")).range(TextRange.from(0, 1)).create(); } }