Class StringBasedDifferenceViewer

  • All Implemented Interfaces:

    public class StringBasedDifferenceViewer
    extends Object
    implements IDifferenceViewer
    Fallback difference viewer which converts both arguments to strings and then compares them. If the delta is not null, this viewer will be disabled.
    Antonio Garcia-Dominguez
    • Constructor Detail

      • StringBasedDifferenceViewer

        public StringBasedDifferenceViewer()
    • Method Detail

      • canCompare

        public boolean canCompare​(Object expected,
                                  Object actual,
                                  Object delta)
        Description copied from interface: IDifferenceViewer
        Returns true if this viewer can show the differences between the expected and the actual results. This method will be called from the SWT thread.
        Specified by:
        canCompare in interface IDifferenceViewer
        expected - Expected value.
        actual - Actual value.
        delta - Precomputed differences, if available. Otherwise, null.

        true if this instance can either:

        • compute and show the differences between expected and actual
        • , or b) show the precomputed differences in delta.

        Otherwise, returns false.