本文整理汇总了Java中org.waveprotocol.wave.model.document.operation.impl.DocOpBuilder.deleteElementEnd方法的典型用法代码示例。如果您正苦于以下问题:Java DocOpBuilder.deleteElementEnd方法的具体用法?Java DocOpBuilder.deleteElementEnd怎么用?Java DocOpBuilder.deleteElementEnd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.waveprotocol.wave.model.document.operation.impl.DocOpBuilder
的用法示例。
在下文中一共展示了DocOpBuilder.deleteElementEnd方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testDeleteElements
import org.waveprotocol.wave.model.document.operation.impl.DocOpBuilder; //导入方法依赖的package包/类
public void testDeleteElements() {
DocOpBuilder m = new DocOpBuilder();
Attributes a = new AttributesImpl(ImmutableMap.of("a1", "1", "a2", "2"));
Attributes b = new AttributesImpl();
Attributes c = new AttributesImpl(ImmutableMap.of("c1", "1", "c2", "2", "c3", "3"));
m.deleteElementStart("a", a);
m.deleteElementStart("b", b);
m.deleteElementStart("c", c);
m.deleteElementEnd();
m.deleteElementEnd();
m.deleteElementEnd();
assertReversible(makeBlipOp("deleteElements", m.build()));
}
示例2: testDeleteCharactersAndElements
import org.waveprotocol.wave.model.document.operation.impl.DocOpBuilder; //导入方法依赖的package包/类
public void testDeleteCharactersAndElements() {
DocOpBuilder m = new DocOpBuilder();
Attributes a = new AttributesImpl(ImmutableMap.of("a1", "1", "a2", "2"));
Attributes b = new AttributesImpl();
Attributes c = new AttributesImpl(ImmutableMap.of("c1", "1", "c2", "2", "c3", "3"));
m.deleteElementStart("a", a);
m.deleteCharacters("hello");
m.deleteElementStart("b", b);
m.deleteCharacters("world");
m.deleteElementStart("c", c);
m.deleteElementEnd();
m.deleteCharacters("blah");
m.deleteElementEnd();
m.deleteElementEnd();
assertReversible(makeBlipOp("deleteCharactersAndElements", m.build()));
}
示例3: testScrubs
import org.waveprotocol.wave.model.document.operation.impl.DocOpBuilder; //导入方法依赖的package包/类
public void testScrubs() {
DocOpBuilder b1 = new DocOpBuilder();
DocOpBuilder b2 = new DocOpBuilder();
b1.characters(VALID);
b2.characters(VALID_SCRUBBED);
b1.deleteCharacters(VALID);
b2.deleteCharacters(VALID_SCRUBBED);
b1.characters(INVALID);
b2.characters(INVALID_SCRUBBED);
b1.deleteCharacters(INVALID);
b2.deleteCharacters(INVALID_SCRUBBED);
b1.elementStart("abc", ATTRS);
b2.elementStart("abc", ATTRS_SCRUBBED);
b1.elementEnd();
b2.elementEnd();
b1.deleteElementStart("abc", ATTRS);
b2.deleteElementStart("abc", ATTRS_SCRUBBED);
b1.deleteElementEnd();
b2.deleteElementEnd();
b1.retain(5);
b2.retain(5);
b1.replaceAttributes(ATTRS, ATTRS);
b2.replaceAttributes(ATTRS_SCRUBBED, ATTRS_SCRUBBED);
b1.updateAttributes(ATTRSUP);
b2.updateAttributes(ATTRSUP_SCRUBBED);
b1.annotationBoundary(ANNO);
b2.annotationBoundary(ANNO_SCRUBBED);
DocOp o1 = DocOpScrub.scrub(b1.buildUnchecked());
DocOp o2 = b2.buildUnchecked();
assertTrue("\n" + o1 + "\n but expected \n" + o2,
OpComparators.SYNTACTIC_IDENTITY.equal(o1, o2));
}