Skip to content

Commit

Permalink
Merge pull request #98 from KTH/issue/96-build-intermediate-tree
Browse files Browse the repository at this point in the history
  • Loading branch information
slarse authored Apr 10, 2020
2 parents 235fd0a + 0d947fa commit adcd24c
Show file tree
Hide file tree
Showing 7 changed files with 611 additions and 477 deletions.
10 changes: 4 additions & 6 deletions src/main/java/se/kth/spork/cli/SporkPrettyPrinter.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package se.kth.spork.cli;

import se.kth.spork.base3dm.Revision;
import se.kth.spork.spoon.PcsInterpreter;
import se.kth.spork.spoon.SpoonTreeBuilder;
import se.kth.spork.spoon.StructuralConflict;
import se.kth.spork.util.Pair;
import spoon.compiler.Environment;
Expand Down Expand Up @@ -62,11 +62,10 @@ protected void exit(CtElement e) {
public SporkPrettyPrinter scan(CtElement e) {
if (e == null) {
return this;
} else if (e.getMetadata(PcsInterpreter.SINGLE_REVISION_KEY) != null &&
} else if (e.getMetadata(SpoonTreeBuilder.SINGLE_REVISION_KEY) != null &&
(e instanceof CtMethod || e instanceof CtField)) {
CtElement originalElement = (CtElement) e.getMetadata(PcsInterpreter.ORIGINAL_NODE_KEY);
String originalSource = SourceExtractor.getOriginalSource(originalElement);
printerHelper.writeRawSourceCode(originalSource, SourceExtractor.getIndentation(originalElement));
String originalSource = SourceExtractor.getOriginalSource(e);
printerHelper.writeRawSourceCode(originalSource, SourceExtractor.getIndentation(e));
return this;
}

Expand Down Expand Up @@ -240,5 +239,4 @@ public void writeRawConflict(String s) {
}
}
}

}
Loading

0 comments on commit adcd24c

Please sign in to comment.