boolean () { final PsiAnnotation propertyAnnotation = myPsiClass.getAnnotation(Property.class.getName()); if (propertyAnnotation == null) return false; final PsiNameValuePair style = AnnotationUtil.findDeclaredAttribute(propertyAnnotation, "style"); if (style == null) return false; final PsiReferenceExpression referenceExpression = tryCast(style.getDetachedValue(), PsiReferenceExpression.class); if (referenceExpression == null) return false; final PsiEnumConstant enumConstant = tryCast(referenceExpression.resolve(), PsiEnumConstant.class); return enumConstant != null && enumConstant.getName().equals(ATTRIBUTE.name()); }