Skip to content

Commit a51723f

Browse files
committed
Rename CollapseEditClasses to LabelWithEditClass
I think the meaningfulness of this rename is best explained by the second sentence of the original class description: > Contrary to its name, [...]
1 parent 4025657 commit a51723f

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/main/java/org/variantsync/diffdetective/diff/difftree/transform/CollapseEditClasses.java renamed to src/main/java/org/variantsync/diffdetective/diff/difftree/transform/LabelWithEditClass.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,21 @@
77
import java.util.List;
88

99
/**
10-
* Collapses edit classes in a DiffTree.
11-
* Contrary to its name, this transformation leaves a DiffTree's graph structure unchanged.
12-
* This transformation uses the {@link RelabelNodes} transformer to relabel all nodes.
10+
* Label all nodes with their edit class.
11+
* This transformation leaves the graph structure of the {@link DiffTree} unchanged.
1312
* All {@link DiffNode#isArtifact() artifact} nodes will be labeled by their respective edit class.
1413
* All other nodes will be labeled by the {@link org.variantsync.diffdetective.diff.difftree.NodeType#name name of their node type}.
1514
* @author Paul Bittner
1615
*/
17-
public class CollapseEditClasses implements DiffTreeTransformer {
16+
public class LabelWithEditClass implements DiffTreeTransformer {
1817
private final DiffTreeTransformer relabelNodes;
1918

2019
/**
2120
* Creates a new transformation that will use the given catalog of edit classes
2221
* to relabel {@link DiffNode#isArtifact() artifact} nodes.
2322
* @param editClasses Catalog of edit classes to match on artifact nodes.
2423
*/
25-
public CollapseEditClasses(final EditClassCatalogue editClasses) {
24+
public LabelWithEditClass(final EditClassCatalogue editClasses) {
2625
relabelNodes = new RelabelNodes(d -> {
2726
if (d.isArtifact()) {
2827
return editClasses.match(d).getName();

0 commit comments

Comments
 (0)