private void doUpdateErrorText(@NotNull ErrorText errorText, @NotNull List<ValidationInfo> infos) {
    HtmlBuilder htmlBuilder = new HtmlBuilder();
    for (ValidationInfo info : infos) {
      if (info.component != null || Strings.isEmptyOrSpaces(info.message)) {
        continue;
      }

      Color color = info.warning ? MessageType.WARNING.getTitleForeground() : NamedColorUtil.getErrorForeground();
      htmlBuilder
        .append(
          HtmlChunk.raw(info.message)
            .wrapWith("left")
            .wrapWith(HtmlChunk.font(ColorUtil.toHex(color)))
        )
        .br();
    }

    // avoid updating size unnecessarily
    boolean needsSizeUpdate = true;
    if (htmlBuilder.isEmpty()) {
      needsSizeUpdate = errorText.clear();
    }
    else {
      errorText.setText(htmlBuilder.wrapWithHtmlBody().toString());
    }
    if (needsSizeUpdate) updateSize();
  }
private void doUpdateErrorText(@NotNull ErrorText errorText, @NotNull List<ValidationInfo> infos)