@Override
  protected void updateComponent() {
    DomElement domElement = getDomElement();
    if (domElement == null || !domElement.isValid()) return;

    EditorTextField textField = getEditorTextField(getComponent());
    Project project = getProject();
    ApplicationManager.getApplication().invokeLater(() -> {
      if (!project.isOpen()) return;
      if (!getDomWrapper().isValid()) return;

      DomElement domElement1 = getDomElement();
      if (domElement1 == null || !domElement1.isValid()) return;

      DomElementAnnotationsManager manager = DomElementAnnotationsManager.getInstance(project);
      DomElementsProblemsHolder holder = manager.getCachedProblemHolder(domElement1);
      List<DomElementProblemDescriptor> errorProblems = holder.getProblems(domElement1);
      List<DomElementProblemDescriptor> warningProblems =
        new ArrayList<>(holder.getProblems(domElement1, true, HighlightSeverity.WARNING));
      warningProblems.removeAll(errorProblems);

      Color background = getDefaultBackground();
      if (!errorProblems.isEmpty() && textField.getText().trim().isEmpty()) {
        background = getErrorBackground();
      }
      else if (!warningProblems.isEmpty()) {
        background = getWarningBackground();
      }

      Editor editor = textField.getEditor();
      if (editor != null) {
        MarkupModel markupModel = editor.getMarkupModel();
        markupModel.removeAllHighlighters();
        if (!errorProblems.isEmpty() && editor.getDocument().getLineCount() > 0) {
          markupModel.addLineHighlighter(CodeInsightColors.ERRORS_ATTRIBUTES, 0, 0);
          editor.getContentComponent().setToolTipText(errorProblems.get(0).getDescriptionTemplate());
        }
      }

      textField.setBackground(background);
    });
  }
@Override
  protected void updateComponent()