boolean (@Nullable PsiReference reference, @NotNull PsiElement element) { if (reference instanceof PsiReferenceExpression && element instanceof PsiMember) { return getClassesWithMember(reference, (PsiMember)element) != null; } return super.acceptImplementationForReference(reference, element); }