Examples of DocOp


Examples of org.waveprotocol.wave.model.document.operation.DocOp

    normalizer.retain(1);
    normalizer.characters("a");
    normalizer.characters("b");
    normalizer.characters("c");
    normalizer.retain(1);
    DocOp docOp = normalizer.finish();
    DocOp expected = new DocOpBuilder()
        .retain(1)
        .characters("abc")
        .retain(1)
        .build();
    assertTrue(OpComparators.SYNTACTIC_IDENTITY.equal(expected, docOp));
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.DocOp

    RangeNormalizer<DocOp> normalizer =
        new RangeNormalizer<DocOp>(new DocOpBuffer());
    normalizer.retain(1);
    normalizer.characters("");
    normalizer.retain(1);
    DocOp docOp = normalizer.finish();
    DocOp expected = new DocOpBuilder()
        .retain(2)
        .build();
    assertTrue(OpComparators.SYNTACTIC_IDENTITY.equal(expected, docOp));
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.DocOp

    normalizer.retain(1);
    normalizer.deleteCharacters("a");
    normalizer.deleteCharacters("b");
    normalizer.deleteCharacters("c");
    normalizer.retain(1);
    DocOp docOp = normalizer.finish();
    DocOp expected = new DocOpBuilder()
        .retain(1)
        .deleteCharacters("abc")
        .retain(1)
        .build();
    assertTrue(OpComparators.SYNTACTIC_IDENTITY.equal(expected, docOp));
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.DocOp

    RangeNormalizer<DocOp> normalizer =
        new RangeNormalizer<DocOp>(new DocOpBuffer());
    normalizer.retain(1);
    normalizer.deleteCharacters("");
    normalizer.retain(1);
    DocOp docOp = normalizer.finish();
    DocOp expected = new DocOpBuilder()
        .retain(2)
        .build();
    assertTrue(OpComparators.SYNTACTIC_IDENTITY.equal(expected, docOp));
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.DocOp

      // ok
    }
  }

  public void testComposerChecking() throws OperationException {
    DocOp checked = new DocOpBuilder().build();
    DocOp unchecked = new DocOpBuilder().elementStart(".!$*.4!(,", Attributes.EMPTY_MAP)
        .elementEnd().buildUnchecked();

    try {
      Composer.compose(checked, unchecked);
      fail();
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.DocOp

    normalizer.retain(1);
    normalizer.annotationBoundary(ANNOTATIONS3);
    normalizer.retain(1);
    normalizer.annotationBoundary(ANNOTATIONS4);
    normalizer.retain(1);
    DocOp docOp = normalizer.finish();
    DocOp expected = new DocOpBuilder()
        .retain(1)
        .annotationBoundary(ANNOTATIONS1)
        .retain(1)
        .annotationBoundary(ANNOTATIONS2)
        .retain(1)
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.DocOp

    normalizer.retain(1);
    normalizer.annotationBoundary(ANNOTATIONS3);
    normalizer.retain(1);
    normalizer.annotationBoundary(ANNOTATIONS4);
    normalizer.retain(1);
    DocOp docOp = normalizer.finish();
    DocOp expected = new DocOpBuilder()
        .retain(1)
        .annotationBoundary(ANNOTATIONS12)
        .retain(1)
        .annotationBoundary(ANNOTATIONS3)
        .retain(1)
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.DocOp

    normalizer.annotationBoundary(ANNOTATIONS2);
    normalizer.annotationBoundary(ANNOTATIONS3);
    normalizer.retain(1);
    normalizer.annotationBoundary(ANNOTATIONS4);
    normalizer.retain(1);
    DocOp docOp = normalizer.finish();
    DocOp expected = new DocOpBuilder()
        .retain(1)
        .annotationBoundary(ANNOTATIONS1)
        .retain(1)
        .annotationBoundary(ANNOTATIONS23)
        .retain(1)
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.DocOp

    normalizer.annotationBoundary(ANNOTATIONS2);
    normalizer.annotationBoundary(ANNOTATIONS3);
    normalizer.retain(1);
    normalizer.annotationBoundary(ANNOTATIONS4);
    normalizer.retain(1);
    DocOp docOp = normalizer.finish();
    DocOp expected = new DocOpBuilder()
        .retain(1)
        .annotationBoundary(ANNOTATIONS123)
        .retain(1)
        .annotationBoundary(ANNOTATIONS4)
        .retain(1)
View Full Code Here

Examples of org.waveprotocol.wave.model.document.operation.DocOp

    normalizer.retain(0);
    normalizer.annotationBoundary(ANNOTATIONS3);
    normalizer.retain(1);
    normalizer.annotationBoundary(ANNOTATIONS4);
    normalizer.retain(1);
    DocOp docOp = normalizer.finish();
    DocOp expected = new DocOpBuilder()
        .retain(1)
        .annotationBoundary(ANNOTATIONS123)
        .retain(1)
        .annotationBoundary(ANNOTATIONS4)
        .retain(1)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.