Currently, accessing different differencers is a bit messy: ```java VariationTree<DiffLinesLabel> s1 = VariationTree.fromFile(pathBefore); VariationTree<DiffLinesLabel> s2 = VariationTree.fromFile(pathAfter); VariationDiff<DiffLinesLabel> diffViaGit, diffViaGumTree, diffViaTrueDiff; diffViaGit = VariationDiff.fromFiles(pathBefore, pathAfter, DiffAlgorithm.SupportedAlgorithm.MYERS, VariationDiffParseOptions.Default); diffViaGumTree = VariationDiff.fromTrees(s1, s2); diffViaTrueDiff = TrueDiffDetective.compare(s1, s2); ``` It would be more transparent if we would have unified interfaces for differencing algorithms such as this for example: ```java public interface TextBasedDifferencer<L extends Label> { public VariationDiff<L> diff(String before, String after); } ``` ```java public interface TreeBasedDifferencer<L extends Label> { public VariationDiff<L> diff(VariationTree<L> before, VariationTree<L> after); } ``` Then methods could rely on these differencers instead of having lots of convencience methods all around the place as of now.
Activity
ibbem commentedon Nov 4, 2025
Addressed in #176