public static @NotNull @Nls String buildStatusMessage(@NotNull Notification notification) {
    String title = notification.getTitle();
    String subtitle = notification.getSubtitle();
    if (StringUtil.isNotEmpty(title) && StringUtil.isNotEmpty(subtitle)) {
      title += " (" + subtitle + ")";
    }
    title = StringUtil.first(title, TITLE_LIMIT, true);

    String content = StringUtil.first(notification.getContent(), TITLE_LIMIT, true);

    @NlsSafe String message;
    if (StringUtil.isNotEmpty(title)) {
      message = title;
      if (StringUtil.isNotEmpty(content)) {
        message += ": ";
        message += content;
      }
    }
    else {
      message = content;
    }

    List<AnAction> actions = notification.getActions();
    if (!actions.isEmpty()) {
      message += " // ";
      message += StringUtil.join(actions, action -> action.getTemplateText(), " // ");
    }

    message = StringUtil.replace(message, "<a href=", " // <a href=");
    message = StringUtil.stripHtml(message, " ");
    message = StringUtil.replace(message, "\n", " ");
    message = StringUtil.replace(message, "&nbsp;", " ");
    message = StringUtil.replace(message, "&raquo;", ">>");
    message = StringUtil.replace(message, "&laquo;", "<<");
    message = StringUtil.replace(message, "&hellip;", "...");
    message = StringUtil.unescapeXmlEntities(message);
    message = StringUtil.collapseWhiteSpace(message);

    return message;
  }
public static @NotNull @Nls String buildStatusMessage(@NotNull Notification notification)