Home
last modified time | relevance | path

Searched refs:DifferenceElement (Results 1 – 11 of 11) sorted by relevance

/external/javaparser/javaparser-core-testing/src/test/java/com/github/javaparser/printer/lexicalpreservation/
DDifferenceElementCalculatorTest.java33 import static com.github.javaparser.printer.lexicalpreservation.DifferenceElement.*;
42 List<DifferenceElement> differenceElements = DifferenceElementCalculator.calculate(a, b); in calculateDifferenceEmpty()
57 List<DifferenceElement> differenceElements = DifferenceElementCalculator.calculate(a, b); in calculateDifferenceAIsEmpty()
76 List<DifferenceElement> differenceElements = DifferenceElementCalculator.calculate(a, b); in calculateDifferenceBIsEmpty()
91 …List<DifferenceElement> differenceElements = DifferenceElementCalculator.calculate(csmOriginal, cs… in compilationUnitExampleWithPackageSetDiff()
105 …List<DifferenceElement> differenceElements = DifferenceElementCalculator.calculate(csmOriginal, cs… in annotationDeclarationExampleWithModifierAdded()
142 …List<DifferenceElement> differenceElements = DifferenceElementCalculator.calculate(csmOriginal, cs… in annotationDeclarationExampleWithNameChanged()
177 …List<DifferenceElement> differenceElements = DifferenceElementCalculator.calculate(csmOriginal, cs… in annotationDeclarationExampleWithJavadocAdded()
212 …List<DifferenceElement> differenceElements = DifferenceElementCalculator.calculate(csmOriginal, cs… in annotationDeclarationExampleWithJavadocRemoved()
247 …List<DifferenceElement> differenceElements = DifferenceElementCalculator.calculate(csmOriginal, cs… in annotationDeclarationExampleWithModifierRemoved()
[all …]
DLexicalDifferenceCalculatorTest.java276 List<DifferenceElement> differenceElements = ldc.calculateListAdditionDifference( in differenceAfterddingStatementToEmptyBlock()
282 …assertEquals(DifferenceElement.kept(CsmElement.token(GeneratedJavaParserConstants.LBRACE)), differ… in differenceAfterddingStatementToEmptyBlock()
283 assertEquals(DifferenceElement.kept(CsmElement.newline()), differenceElements.get(index++)); in differenceAfterddingStatementToEmptyBlock()
284 assertEquals(DifferenceElement.added(CsmElement.indent()), differenceElements.get(index++)); in differenceAfterddingStatementToEmptyBlock()
286 … assertEquals(DifferenceElement.added(CsmElement.newline()), differenceElements.get(index++)); in differenceAfterddingStatementToEmptyBlock()
287 … assertEquals(DifferenceElement.added(CsmElement.unindent()), differenceElements.get(index++)); in differenceAfterddingStatementToEmptyBlock()
288 …assertEquals(DifferenceElement.kept(CsmElement.token(GeneratedJavaParserConstants.RBRACE)), differ… in differenceAfterddingStatementToEmptyBlock()
292 private boolean isAddedChild(DifferenceElement element, Class<? extends Node> childClass) { in isAddedChild()
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/printer/lexicalpreservation/
DDifferenceElement.java5 public interface DifferenceElement { interface
6 static DifferenceElement added(CsmElement element) { in added()
10 static DifferenceElement removed(CsmElement element) { in removed()
14 static DifferenceElement kept(CsmElement element) { in kept()
DDifferenceElementCalculator.java93 …static List<DifferenceElement> calculate(LexicalDifferenceCalculator.CalculatedSyntaxModel origina… in calculate()
113 List<DifferenceElement> elements = new LinkedList<>(); in calculate()
136 … private static void considerRemoval(NodeText nodeTextForChild, List<DifferenceElement> elements) { in considerRemoval()
150 …t considerRemoval(CsmElement removedElement, int originalIndex, List<DifferenceElement> elements) { in considerRemoval()
169 …private static List<DifferenceElement> calculateImpl(LexicalDifferenceCalculator.CalculatedSyntaxM… in calculateImpl()
171 List<DifferenceElement> elements = new LinkedList<>(); in calculateImpl()
209 …List<DifferenceElement> addingElements = calculate(original.from(originalIndex), after.from(afterI… in calculateImpl()
210 List<DifferenceElement> removingElements = null; in calculateImpl()
229 private static long cost(List<DifferenceElement> elements) { in cost()
238 static void removeIndentationElements(List<DifferenceElement> elements) { in removeIndentationElements()
DDifference.java31 private final List<DifferenceElement> diffElements;
39 Difference(List<DifferenceElement> diffElements, NodeText nodeText, Node node) { in Difference()
132 DifferenceElement diffElement = diffElements.get(diffIndex); in apply()
174 DifferenceElement diffElement = diffElements.get(diffIndex); in applyLeftOverDiffElements()
200 private void extractReshuffledDiffElements(List<DifferenceElement> diffElements) { in extractReshuffledDiffElements()
202 DifferenceElement diffElement = diffElements.get(index); in extractReshuffledDiffElements()
332 DifferenceElement diffElement = diffElements.get(i); in groupConsecutiveRemovedElements()
646 private boolean isFollowedByUnindent(List<DifferenceElement> diffElements, int diffIndex) { in isFollowedByUnindent()
DLexicalDifferenceCalculator.java89 …List<DifferenceElement> calculateListRemovalDifference(ObservableProperty observableProperty, Node… in calculateListRemovalDifference()
97 …List<DifferenceElement> calculateListAdditionDifference(ObservableProperty observableProperty, Nod… in calculateListAdditionDifference()
105 …List<DifferenceElement> calculateListReplacementDifference(ObservableProperty observableProperty, … in calculateListReplacementDifference()
120 …List<DifferenceElement> differenceElements = DifferenceElementCalculator.calculate(original, after… in calculatePropertyChange()
DReshuffled.java9 public class Reshuffled implements DifferenceElement {
DAdded.java8 public class Added implements DifferenceElement {
DRemoved.java8 public class Removed implements DifferenceElement {
DKept.java10 public class Kept implements DifferenceElement {
DLexicalPreservingPrinter.java264 final List<DifferenceElement> differenceElements; in concreteListChange()
280 …List<DifferenceElement> differenceElements = LEXICAL_DIFFERENCE_CALCULATOR.calculateListReplacemen… in concreteListReplacement()