/**
  * @see
  *     Diff#appendDescription(org.eclipse.persistence.tools.workbench.utility.io.IndentingPrintWriter)
  */
 public void appendDescription(IndentingPrintWriter pw) {
   if (this.different()) {
     pw.print("The ");
     pw.print(ClassTools.shortNameFor(this.javaClass));
     pw.print("s are different:");
     pw.println();
   }
   super.appendDescription(pw);
 }
Ejemplo n.º 2
0
 private void extractCodeEdits(
     ByteArrayOutputStream diffTexts, DiffFormatter df, DiffEntry d, CompositeDiff cd)
     throws IOException {
   df.format(d);
   String[] lines = diffTexts.toString().split("\n");
   for (int i = 0; i < lines.length; i++) {
     StringBuffer block = new StringBuffer(250);
     if (lines[i].startsWith("diff")
         && (lines[i].contains(cd.getNewPath()) || lines[i].contains(cd.getOldPath()))) {
       block.append(lines[i]);
       i++;
       while (i < lines.length && !lines[i].startsWith("diff")) {
         block.append(lines[i] + "\n");
         i++;
       }
       addCodeEditEntriesForDiffText(cd, block.toString());
       i--;
     }
   }
 }