public static boolean isClassAcceptable(@Nullable XmlTag targetTag, final @Nullable PsiClass fromClass,
                                          @NotNull BiConsumer<? super String, ? super Validator.ValidationHost.ErrorType> messageConsumer) {
    if (targetTag == null || fromClass == null || !fromClass.isValid()) {
      return true;
    }
    final XmlElementDescriptor tagDescriptor = targetTag.getDescriptor();
    if (tagDescriptor instanceof JavaFxPropertyTagDescriptor) {
      final PsiClass containingClass = ((JavaFxPropertyTagDescriptor)tagDescriptor).getPsiClass();
      final PsiType targetType = getWritablePropertyType(containingClass, tagDescriptor.getDeclaration());
      return canCoerce(targetType, fromClass, targetTag, messageConsumer);
    }
    else if (tagDescriptor instanceof JavaFxClassTagDescriptorBase) {
      final PsiElement tagDeclaration = tagDescriptor.getDeclaration();
      if (tagDeclaration instanceof PsiClass defaultPropertyOwnerClass) {
        final XmlAttribute factoryAttr = targetTag.getAttribute(FxmlConstants.FX_FACTORY);
        if (factoryAttr != null) {
          defaultPropertyOwnerClass = getFactoryProducedClass((PsiClass)tagDeclaration, factoryAttr.getValue());
        }
        final PsiType targetType = getDefaultPropertyExpectedType(defaultPropertyOwnerClass);
        if (targetType != null) {
          return canCoerce(targetType, fromClass, targetTag, messageConsumer);
        }
        if (!isObservableCollection(defaultPropertyOwnerClass)) {
          return noDefaultPropertyError(messageConsumer);
        }
      }
    }
    return true;
  }
public static boolean isClassAcceptable(@Nullable XmlTag targetTag, final @Nullable PsiClass fromClass,
                                          @NotNull BiConsumer<? super String, ? super Validator.ValidationHost.ErrorType> messageConsumer)