Class EMFComparePrettyPrinter

java.lang.Object
org.eclipse.emf.compare.utils.EMFComparePrettyPrinter

public final class EMFComparePrettyPrinter
extends java.lang.Object
This class exposes methods to serialize a "human-readable" form of the comparison model onto a given stream.
  • Method Summary

    Modifier and Type Method Description
    static void printComparison​(Comparison comparison, java.io.PrintStream stream)
    Prints the whole comparison on the given stream (might be stream).
    static void printDifferences​(Comparison comparison, java.io.PrintStream stream)
    Prints all differences detected for the given comparison on the given stream.
    static void printMatch​(Comparison comparison, java.io.PrintStream stream)
    Prints all the Match elements contained by the given comparison.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • printComparison

      public static void printComparison​(Comparison comparison, java.io.PrintStream stream)
      Prints the whole comparison on the given stream (might be stream).
      Parameters:
      comparison - The comparison we are to print on stream.
      stream - The PrintStream on which we should print this comparison model.
    • printMatch

      public static void printMatch​(Comparison comparison, java.io.PrintStream stream)
      Prints all the Match elements contained by the given comparison. Each Match will be displayed on its own line.

      For example, if the left model has two packages "package1" and "package2", but the right has "package1" and "package3", what we will display here depends on the Match : if "left.package1" is matched with "right.package1", but "package2" and "package3" did not match, this will print

       | package1 | package1 |
       | package2 |          |
       |          | package3 |
       
      On the contrary, if "package2" and "package3" did match, we will display
       | package1 | package1 |
       | package2 | package3 |
       

      Parameters:
      comparison - The comparison which Matched elements we are to print on stream.
      stream - The PrintStream on which we should print the matched elements of this comparison.
    • printDifferences

      public static void printDifferences​(Comparison comparison, java.io.PrintStream stream)
      Prints all differences detected for the given comparison on the given stream.
      Parameters:
      comparison - The comparison which differences we are to print on stream.
      stream - The PrintStream on which we should print these differences.