boolean (PsiElement position) { PsiElement parent = position.getParent(); if (parent instanceof GrReferenceExpression) { PsiElement pparent = parent.getParent(); if (pparent instanceof GrAnnotationNameValuePair) { PsiElement identifier = ((GrAnnotationNameValuePair)pparent).getNameIdentifierGroovy(); if (identifier == null) { PsiElement ppparent = pparent.getParent().getParent(); if (ppparent instanceof GrAnnotation) { PsiElement resolved = ((GrAnnotation)ppparent).getClassReference().resolve(); if (resolved instanceof PsiClass && ((PsiClass)resolved).isAnnotationType()) { PsiMethod[] values = ((PsiClass)resolved).findMethodsByName("value", false); return values.length == 0; } } } } } return false; }