boolean (Object obj, PsiElement parent) { if (parent instanceof GrAnnotationNameValuePair || parent != null && parent.getParent() instanceof GrAnnotationNameValuePair) { if (obj instanceof PsiMethod) { PsiClass aClass = ((PsiMethod)obj).getContainingClass(); if (aClass != null && aClass.isAnnotationType()) { return true; } } } return false; }