use of org.eclipse.text.edits.MultiTextEdit in project eclipse.platform.text by eclipse.
the class TextEditTests method testMoveTree1.
@Test
public void testMoveTree1() {
TextEdit root = new MultiTextEdit();
TextEdit e1 = new ReplaceEdit(0, 1, "");
root.addChild(e1);
TextEdit e2 = new ReplaceEdit(2, 2, "");
root.addChild(e2);
root.moveTree(3);
Assert.assertEquals(3, root.getOffset());
Assert.assertEquals(4, root.getLength());
Assert.assertEquals(3, e1.getOffset());
Assert.assertEquals(1, e1.getLength());
Assert.assertEquals(5, e2.getOffset());
Assert.assertEquals(2, e2.getLength());
}
Aggregations