@Override
    @NotNull
    public String getMessage() {
      HtmlBuilder builder = new HtmlBuilder();
      LayoutCodeInfoCollector notifications = myProcessor.getInfoCollector();
      LOG.assertTrue(notifications != null);

      if (notifications.isEmpty() && !myNoChangesDetected) {
        if (notifications.getSecondFormatNotification() != null) {
          builder.append(notifications.getSecondFormatNotification()).br();
        }
        else if (myProcessChangesTextOnly) {
          builder.append(LangBundle.message("formatter.in.editor.message.already.formatted")).br();
        }
        else {
          builder.append(LangBundle.message("formatter.in.editor.message.content.already.formatted")).br();
        }
      }
      else {
        if (notifications.hasReformatOrRearrangeNotification()) {
          String reformatInfo = notifications.getReformatCodeNotification();
          String rearrangeInfo = notifications.getRearrangeCodeNotification();

          builder.append(joinWithCommaAndCapitalize(reformatInfo, rearrangeInfo));

          if (myProcessChangesTextOnly) {
            builder.append(LangBundle.message("formatter.in.editor.message.changes.since.last.revision"));
          }

          builder.br();
        }
        else if (myNoChangesDetected) {
          builder.append(LangBundle.message("formatter.in.editor.message.no.changes.since.last.revision")).br();
        }

        String optimizeImportsNotification = notifications.getOptimizeImportsNotification();
        if (optimizeImportsNotification != null) {
          builder.append(optimizeImportsNotification).br();
        }
        if (notifications.getSecondFormatNotification() != null) {
          builder.append(notifications.getSecondFormatNotification()).br();
        }
      }

      String shortcutText = KeymapUtil.getFirstKeyboardShortcutText(ActionManager.getInstance().getAction("ShowReformatFileDialog"));
      String color = ColorUtil.toHtmlColor(JBColor.gray);

      builder.append(HtmlChunk.span("color:"+color)
                              .child(HtmlChunk.raw(LangBundle.message("formatter.in.editor.link.show.reformat.dialog"))).addText(shortcutText));

      return builder.wrapWith("html").toString();
    }
@Override
    @NotNull
    public String getMessage()