void (@NotNull PsiElement element) { AnnotationSessionImpl.computeWithSession(file, false, holder -> { holder.runAnnotatorWithContext(element, annotator); for (Annotation annotation : holder) { if (annotation.getSeverity() == HighlightSeverity.ERROR) { error[0] = annotation.getMessage(); break; } } return null; }); super.visitElement(element); }