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

    final JComboBox<Pair<String, Icon>> comboBox = getComponent();

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

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

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

      Color background = getDefaultBackground();
      comboBox.setToolTipText(null);

      if (errorProblems.size() > 0) {
        background = getErrorBackground();
        comboBox.setToolTipText(TooltipUtils.getTooltipText(errorProblems));
      }
      else if (warningProblems.size() > 0) {
        background = getWarningBackground();
        comboBox.setToolTipText(TooltipUtils.getTooltipText(warningProblems));
      }

      final Pair<String, Icon> pair = (Pair<String, Icon>)comboBox.getSelectedItem();
      final String s = Pair.getFirst(pair);
      background = s != null && s.trim().length() > 0 ? getDefaultBackground() : background;

      comboBox.setBackground(background);
      comboBox.getEditor().getEditorComponent().setBackground(background);
    });
  }
@Override
  protected void updateComponent()