Bug 39324 TextEdits: Moved positions removed
20030625 See TextBufferTest.testMoveWithRangeMarker2 The RangeMarker is inside the MoveSource, and the MoveSource inside a delete: The resulting range of the Range Marker is deleted, not moved (TextBufferTest.testMoveWithRangeMarker shows that is works if there is no surrounding delete)
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TextBufferTest.java
assertTrue(fEditor.canPerformEdits());
		UndoMemento undo= fEditor.performEdits(null);
		assertEquals("Buffer content", "0189", fBuffer.getContent());
		assertTrue(e2.getTextRange().isDeleted());
		assertTrue(e3.getTextRange().isDeleted());
		assertTrue(e4.getTextRange().isDeleted());
		doUndoRedo(undo, "0189");
	}
	
	public void testMove1() throws Exception {
		MoveSourceEdit s1= new MoveSourceEdit(2, 2);
		MoveTargetEdit t1= new MoveTargetEdit(5, s1);
		fEditor.add(s1);
		fEditor.add(t1);
		assertTrue(fEditor.canPerformEdits());
		UndoMemento undo= fEditor.performEdits(null);
		assertEquals("Buffer content", "0142356789", fBuffer.getContent());
		assertEquals(s1.getTextRange(), 2, 0);
		assertEquals(t1.getTextRange(), 3, 2);
		doUndoRedo(undo, "0142356789");
	}
	
	public void testMove2() throws Exception {
		MoveSourceEdit s1= new MoveSourceEdit(5, 2);
		MoveTargetEdit t1= new MoveTargetEdit(2, s1);
		fEditor.add(s1);
		fEditor.add(t1);
		assertTrue(fEditor.canPerformEdits());
		UndoMemento undo= fEditor.performEdits(null);
		assertEquals("Buffer content", "0156234789", fBuffer.getContent());