use of com.intellij.openapi.editor.ex.DocumentEx in project intellij-community by JetBrains.
the class RangeMarkerTest method testMoveTextRetargetsMarkers.
public void testMoveTextRetargetsMarkers() throws Exception {
RangeMarkerEx marker1 = createMarker("01234567890", 1, 3);
DocumentEx document = (DocumentEx) marker1.getDocument();
RangeMarker marker2 = document.createRangeMarker(2, 4);
document.moveText(0, 5, 8);
assertEquals("56701234890", document.getText());
assertValidMarker(marker1, 4, 6);
assertValidMarker(marker2, 5, 7);
}
use of com.intellij.openapi.editor.ex.DocumentEx in project intellij-community by JetBrains.
the class RangeMarkerTest method testE2.
public void testE2() {
DocumentEx document = (DocumentEx) EditorFactory.getInstance().createDocument(StringUtil.repeatSymbol(' ', 10));
List<RangeMarker> mm = add(document, 0, 3, 6, 9, 8, 8);
edit(document, 0, 3, 0);
delete(mm, 0);
}
use of com.intellij.openapi.editor.ex.DocumentEx in project intellij-community by JetBrains.
the class RangeMarkerTest method testMoveText2.
public void testMoveText2() throws Exception {
RangeMarkerEx marker1 = createMarker(StringUtil.repeat(" ", 100), 0, 0);
DocumentEx document = (DocumentEx) marker1.getDocument();
RangeMarker marker2 = document.createRangeMarker(49, 49);
document.moveText(0, 1, 49);
marker1.dispose();
marker2.dispose();
}
use of com.intellij.openapi.editor.ex.DocumentEx in project intellij-community by JetBrains.
the class RangeMarkerTest method testX2.
public void testX2() {
DocumentEx document = (DocumentEx) EditorFactory.getInstance().createDocument(StringUtil.repeatSymbol(' ', 10));
List<RangeMarker> mm = add(document, 2, 9, 0, 0, 7, 7);
delete(mm, 0);
}
use of com.intellij.openapi.editor.ex.DocumentEx in project intellij-community by JetBrains.
the class RangeMarkerTest method testE12.
public void testE12() {
DocumentEx document = (DocumentEx) EditorFactory.getInstance().createDocument(StringUtil.repeatSymbol(' ', 10));
List<RangeMarker> mm = add(document, 3, 3, 8, 8, 5, 5, 5, 6);
edit(document, 2, 0, 2);
delete(mm, 2);
}
Aggregations