Skip to content

Commit 97bad80

Browse files
committed
make BadVDiff be a source
1 parent d6134de commit 97bad80

File tree

1 file changed

+12
-1
lines changed
  • src/main/java/org/variantsync/diffdetective/variation/diff/bad

1 file changed

+12
-1
lines changed

src/main/java/org/variantsync/diffdetective/variation/diff/bad/BadVDiff.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import org.variantsync.diffdetective.diff.text.DiffLineNumberRange;
44
import org.variantsync.diffdetective.util.Assert;
55
import org.variantsync.diffdetective.util.CompositeSource;
6+
import org.variantsync.diffdetective.util.Source;
67
import org.variantsync.diffdetective.util.StringUtils;
78
import org.variantsync.diffdetective.variation.Label;
89
import org.variantsync.diffdetective.variation.diff.DiffNode;
@@ -68,7 +69,7 @@ public record BadVDiff<L extends Label>(
6869
Map<VariationTreeNode<L>, VariationTreeNode<L>> matching,
6970
Map<VariationTreeNode<L>, DiffType> coloring,
7071
Map<VariationTreeNode<L>, DiffLineNumberRange> lines
71-
)
72+
) implements Source
7273
{
7374
/**
7475
* Memoization of the VariationTreeNodes a DiffNode was
@@ -454,4 +455,14 @@ public String prettyPrint() {
454455
prettyPrint("", b, diff.root());
455456
return b.toString();
456457
}
458+
459+
@Override
460+
public String getSourceExplanation() {
461+
return "BadVDiff";
462+
}
463+
464+
@Override
465+
public List<Source> getSources() {
466+
return List.of(diff);
467+
}
457468
}

0 commit comments

Comments
 (0)