@Override
  public void validate(@NotNull XmlTag context, @NotNull ValidationHost host) {
    final XmlTag parentTag = context.getParentTag();
    if (parentTag != null) {
      final XmlAttribute attribute = context.getAttribute(FxmlConstants.FX_CONTROLLER);
      if (attribute != null) {
        host.addMessage(attribute.getNameElement(),
                        JavaFXBundle.message("inspection.message.fx.controller.can.only.be.applied.to.root.element"), ValidationHost.ErrorType.ERROR); //todo add delete/move to upper tag fix
      }
    }
    final Pair<PsiClass, Boolean> tagValueClassInfo = JavaFxPsiUtil.getTagValueClass(context, getPsiClass());
    final PsiClass aClass = tagValueClassInfo.getFirst();
    JavaFxPsiUtil.isClassAcceptable(parentTag, aClass, (@InspectionMessage var errorMessage, var errorType) ->
      host.addMessage(context.getNavigationElement(), errorMessage, errorType));
    boolean needInstantiate = !tagValueClassInfo.getSecond();
    if (needInstantiate && aClass != null && aClass.isValid()) {
      JavaFxPsiUtil.isAbleToInstantiate(aClass, (@InspectionMessage var errorMessage) ->
        host.addMessage(context, errorMessage, ValidationHost.ErrorType.ERROR));
    }
  }
@Override
  public void validate(@NotNull XmlTag context, @NotNull ValidationHost host)