private void updateErrorMessage() {
        if (chooser == null || chooser.isDisposed()) return;
        TemplateResource template = (TemplateResource)comboBox.getSelectedItem();
        if (template != null && inaccessibleTemplates != null && inaccessibleTemplates.contains(template)) {
          ComponentValidator validator = ComponentValidator.getInstance(comboBox)
            .orElseGet(() -> new ComponentValidator(chooser.getDisposable()).installOn(comboBox));
          String className = template.getClassName();
          String message = className != null
                           ? JavaBundle.message("dialog.message.class.not.found", className)
                           : JavaBundle.message("dialog.message.template.not.applicable");
          validator.updateInfo(new ValidationInfo(message, comboBox));
        }
        else {
          ComponentValidator.getInstance(comboBox).ifPresent(v -> v.updateInfo(null));
        }
      }
private void updateErrorMessage()