Home | History | Annotate | Download | only in plaintext

Lines Matching refs:Operation

61    * Cost of an empty edit operation in terms of edit characters.
119 * {Diff(Operation.DELETE, "Hello"), Diff(Operation.INSERT, "Goodbye"),
120 * Diff(Operation.EQUAL, " world.")}
123 public enum Operation {
162 diffs.add(new Diff(Operation.EQUAL, text1));
183 diffs.addFirst(new Diff(Operation.EQUAL, commonprefix));
186 diffs.addLast(new Diff(Operation.EQUAL, commonsuffix));
210 diffs.add(new Diff(Operation.INSERT, text2));
216 diffs.add(new Diff(Operation.DELETE, text1));
225 Operation op = (text1.length() > text2.length()) ?
226 Operation.DELETE : Operation.INSERT;
228 diffs.add(new Diff(Operation.EQUAL, shorttext));
248 diffs.add(new Diff(Operation.EQUAL, mid_common));
270 diffs.add(new Diff(Operation.DELETE, text1));
271 diffs.add(new Diff(Operation.INSERT, text2));
282 diffs.add(new Diff(Operation.EQUAL, ""));
290 switch (thisDiff.operation) {
548 Operation last_op = null;
553 if (last_op == Operation.DELETE) {
556 path.addFirst(new Diff(Operation.DELETE,
559 last_op = Operation.DELETE;
563 if (last_op == Operation.INSERT) {
566 path.addFirst(new Diff(Operation.INSERT,
569 last_op = Operation.INSERT;
576 if (last_op == Operation.EQUAL) {
579 path.addFirst(new Diff(Operation.EQUAL, text1.substring(x, x + 1)));
581 last_op = Operation.EQUAL;
601 Operation last_op = null;
606 if (last_op == Operation.DELETE) {
609 path.addLast(new Diff(Operation.DELETE,
612 last_op = Operation.DELETE;
616 if (last_op == Operation.INSERT) {
619 path.addLast(new Diff(Operation.INSERT,
622 last_op = Operation.INSERT;
630 if (last_op == Operation.EQUAL) {
633 path.addLast(new Diff(Operation.EQUAL,
636 last_op = Operation.EQUAL;
801 if (thisDiff.operation == Operation.EQUAL) {
820 pointer.set(new Diff(Operation.DELETE, lastequality));
822 pointer.add(new Diff(Operation.INSERT, lastequality));
877 if (prevDiff.operation == Operation.EQUAL &&
878 nextDiff.operation == Operation.EQUAL) {
1006 // Is there an insertion operation before the last equality.
1008 // Is there a deletion operation before the last equality.
1010 // Is there an insertion operation after the last equality.
1012 // Is there a deletion operation after the last equality.
1017 if (thisDiff.operation == Operation.EQUAL) {
1034 if (thisDiff.operation == Operation.DELETE) {
1060 pointer.set(new Diff(Operation.DELETE, lastequality));
1062 pointer.add(thisDiff = new Diff(Operation.INSERT, lastequality));
1108 diffs.add(new Diff(Operation.EQUAL, "")); // Add a dummy entry at the end.
1118 switch (thisDiff.operation) {
1147 assert thisDiff.operation == Operation.EQUAL
1152 pointer.add(new Diff(Operation.EQUAL,
1173 pointer.add(new Diff(Operation.DELETE, text_delete));
1176 pointer.add(new Diff(Operation.INSERT, text_insert));
1215 if (prevDiff.operation == Operation.EQUAL &&
1216 nextDiff.operation == Operation.EQUAL) {
1268 if (aDiff.operation != Operation.INSERT) {
1272 if (aDiff.operation != Operation.DELETE) {
1284 if (lastDiff != null && lastDiff.operation == Operation.DELETE) {
1304 switch (aDiff.operation) {
1318 if (aDiff.operation != Operation.DELETE) {
1334 if (aDiff.operation != Operation.INSERT) {
1350 if (aDiff.operation != Operation.DELETE) {
1369 switch (aDiff.operation) {
1400 switch (aDiff.operation) {
1447 // operation of this token (delete, insert, equality).
1463 diffs.add(new Diff(Operation.INSERT, param));
1488 diffs.add(new Diff(Operation.EQUAL, text));
1490 diffs.add(new Diff(Operation.DELETE, text));
1496 "Invalid diff operation in diff_fromDelta: " + token.charAt(0));
1716 patch.diffs.addFirst(new Diff(Operation.EQUAL, prefix));
1722 patch.diffs.addLast(new Diff(Operation.EQUAL, suffix));
1811 if (patch.diffs.isEmpty() && aDiff.operation != Operation.EQUAL) {
1817 switch (aDiff.operation) {
1857 if (aDiff.operation != Operation.INSERT) {
1860 if (aDiff.operation != Operation.DELETE) {
1884 Diff diffCopy = new Diff(aDiff.operation, aDiff.text);
1980 if (aDiff.operation != Operation.EQUAL) {
1982 if (aDiff.operation == Operation.INSERT) {
1986 } else if (aDiff.operation == Operation.DELETE) {
1993 if (aDiff.operation != Operation.DELETE) {
2031 if (diffs.isEmpty() || diffs.getFirst().operation != Operation.EQUAL) {
2033 diffs.addFirst(new Diff(Operation.EQUAL, nullPadding));
2053 if (diffs.isEmpty() || diffs.getLast().operation != Operation.EQUAL) {
2055 diffs.addLast(new Diff(Operation.EQUAL, nullPadding));
2082 Operation diff_type;
2105 patch.diffs.add(new Diff(Operation.EQUAL, precontext));
2109 diff_type = bigpatch.diffs.getFirst().operation;
2111 if (diff_type == Operation.INSERT) {
2117 } else if (diff_type == Operation.DELETE && patch.diffs.size() == 1
2118 && patch.diffs.getFirst().operation == Operation.EQUAL
2132 if (diff_type == Operation.EQUAL) {
2161 && patch.diffs.getLast().operation == Operation.EQUAL) {
2164 patch.diffs.add(new Diff(Operation.EQUAL, postcontext));
2264 patch.diffs.add(new Diff(Operation.DELETE, line));
2267 patch.diffs.add(new Diff(Operation.INSERT, line));
2270 patch.diffs.add(new Diff(Operation.EQUAL, line));
2287 * Class representing one diff operation.
2293 public Operation operation;
2295 * The text associated with this diff operation.
2301 * @param operation One of INSERT, DELETE or EQUAL.
2304 public Diff(Operation operation, String text) {
2305 operation and text.
2306 this.operation = operation;
2317 return "Diff(" + this.operation + ",\"" + prettyText + "\")";
2328 return (((Diff) d).operation == this.operation)
2338 * Class representing one patch operation.
2383 switch (aDiff.operation) {