boolean (PsiElement position) { PsiAnnotation anno = PsiTreeUtil.getParentOfType(position, PsiAnnotation.class, true, PsiMember.class); return anno != null && PsiTreeUtil.isAncestor(anno.getNameReferenceElement(), position, true); }