void (@NotNull PsiElement element, @NotNull AnnotationHolder holder) { if (element instanceof PsiReference && element.getText().equals("MyClass")) { AnnotationBuilder builder = holder.newAnnotation(HighlightSeverity.ERROR, "my class"); UnresolvedReferenceQuickFixUpdater.getInstance(element.getProject()).registerQuickFixesLater((PsiReference)element, builder); builder.create(); this.iDidIt(); } }