boolean (Object element, PsiElement context) { PsiNameValuePair pair = PsiTreeUtil.getParentOfType(context, PsiNameValuePair.class, false, PsiMember.class, PsiStatement.class, PsiCall.class); if (null == pair) return false; if (!myParameterName.equals(pair.getName())) return false; PsiAnnotation annotation = PsiTreeUtil.getParentOfType(pair, PsiAnnotation.class); if (annotation == null) return false; return ContainerUtil.find(myAnnotationFqns, fqn -> annotation.hasQualifiedName(fqn)) != null; }