mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
27.55.2009 9abf2773c43eec1c96c1130bb0425e9b19cee4c6
Complete fix for issue 4372 (control-panel output is on one line on copy).
2 files modified
23 ■■■■■ changed files
opends/src/guitools/org/opends/guitools/controlpanel/ui/ProgressDialog.java 21 ●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/util/HtmlProgressMessageFormatter.java 2 ●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/controlpanel/ui/ProgressDialog.java
@@ -271,23 +271,14 @@
    /**
     * Appends a line to the logs (Details are) section of the panel.  The text
     * will be preceded by a new line (is similar to println()).
     * will have a new-line char at the end (is similar to println()).
     * @param msg the HTML formatted text to be appended.
     */
    public void appendErrorLine(String msg)
    {
      HTMLDocument doc = (HTMLDocument)logs.getDocument();
      msg = Utilities.applyFont(msg+"<br>", ColorAndFontConstants.progressFont);
      try
      {
        msg = filterForBugID4988885(msg);
        doc.insertBeforeStart(doc.getElement(LASTID), msg);
      }
      catch (Throwable t)
      {
        // Bug
        t.printStackTrace();
      }
      msg = filterForBugID4988885(msg+"<br>");
      msg = Utilities.applyFont(msg, ColorAndFontConstants.progressFont);
      appendHtml(msg);
    }
    /**
@@ -581,7 +572,7 @@
    }
    /**
     * Checks if the 'Close when over' checkbox is selected and if it is the
     * Checks if the 'Close when over' check box is selected and if it is the
     * case, closes the dialog after waiting for 2 seconds (so that the user
     * can see the result, or cancel the automatic closing of the dialog).
     *
@@ -630,6 +621,6 @@
   */
  private static String filterForBugID4988885(String msg)
  {
    return msg.replaceAll("<br>", "<br>&#10;");
    return msg.replaceAll("<br>", "&#10;<br>");
  }
}
opends/src/quicksetup/org/opends/quicksetup/util/HtmlProgressMessageFormatter.java
@@ -70,7 +70,7 @@
   * http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4988885
   */
   private static final Message LINE_BREAK=
     Message.raw(Constants.HTML_LINE_BREAK+"&#10;");
     Message.raw("&#10;"+Constants.HTML_LINE_BREAK);
  /**
   * Returns the HTML representation of the text without providing any style.