public static @InspectionMessage @Nullable String validateLiteralOrEnumConstant(@NotNull XmlAttributeValue xmlAttributeValue, @NotNull String value) {
    final PsiElement parent = xmlAttributeValue.getParent();
    if (parent instanceof XmlAttribute) {
      final XmlAttributeDescriptor descriptor = ((XmlAttribute)parent).getDescriptor();
      if (descriptor instanceof JavaFxPropertyAttributeDescriptor) {
        final PsiClass aClass = ((JavaFxPropertyAttributeDescriptor)descriptor).getEnum();
        if (aClass != null) {
          final PsiField field = aClass.findFieldByName(value, true);
          if (field == null || !((JavaFxPropertyAttributeDescriptor)descriptor).isConstant(field)) {
            return JavaFXBundle.message("invalid.enumerated.value");
          }
          return null;
        }
      }
    }
    return validateLiteral(xmlAttributeValue, value);
  }
public static @InspectionMessage @Nullable String validateLiteralOrEnumConstant(@NotNull XmlAttributeValue xmlAttributeValue, @NotNull String value)