Search in sources :

Example 71 with DocumentEx

use of com.intellij.openapi.editor.ex.DocumentEx in project intellij-community by JetBrains.

the class RangeMarkerTest method testE7.

public void testE7() {
    DocumentEx document = (DocumentEx) EditorFactory.getInstance().createDocument(StringUtil.repeatSymbol(' ', 10));
    List<RangeMarker> mm = add(document, 6, 7, 0, 3, 3, 6, 5, 9, 2, 9);
    edit(document, 5, 2, 0);
}
Also used : DocumentEx(com.intellij.openapi.editor.ex.DocumentEx)

Example 72 with DocumentEx

use of com.intellij.openapi.editor.ex.DocumentEx in project intellij-community by JetBrains.

the class RangeMarkerTest method testSwap.

public void testSwap() {
    RangeMarkerEx marker1 = createMarker("012345678901234567", 5, 6);
    DocumentEx document = (DocumentEx) marker1.getDocument();
    document.createRangeMarker(3, 5);
    document.createRangeMarker(6, 7);
    document.createRangeMarker(4, 4);
    marker1.dispose();
}
Also used : DocumentEx(com.intellij.openapi.editor.ex.DocumentEx) RangeMarkerEx(com.intellij.openapi.editor.ex.RangeMarkerEx)

Example 73 with DocumentEx

use of com.intellij.openapi.editor.ex.DocumentEx in project intellij-community by JetBrains.

the class RangeMarkerTest method testE1.

public void testE1() {
    DocumentEx document = (DocumentEx) EditorFactory.getInstance().createDocument(StringUtil.repeatSymbol(' ', 10));
    List<RangeMarker> mm = add(document, 3, 5, 0, 1, 9, 9);
    edit(document, 3, 6, 0);
    delete(mm, 0);
}
Also used : DocumentEx(com.intellij.openapi.editor.ex.DocumentEx)

Example 74 with DocumentEx

use of com.intellij.openapi.editor.ex.DocumentEx in project intellij-community by JetBrains.

the class RangeMarkerTest method testE17.

public void testE17() {
    DocumentEx document = (DocumentEx) EditorFactory.getInstance().createDocument(StringUtil.repeatSymbol(' ', 100));
    List<RangeMarker> mm = add(document, 15, 85, 79, 88, 90, 94, 43, 67, 54, 89, 81, 98, 1, 34, 58, 93, 22, 23, 44, 45, 63, 84, 45, 76, 58, 87, 40, 59, 5, 81, 95, 95, 12, 61, 52, 65, 80, 95, 6, 16, 7, 67, 59, 63, 91, 96, 99, 99, 50, 96, 72, 78, 78, 78, 85, 85, 5, 51, 90, 91);
    edit(document, 20, 26, 0, 15, 0, 4, 64, 4, 0);
}
Also used : DocumentEx(com.intellij.openapi.editor.ex.DocumentEx)

Example 75 with DocumentEx

use of com.intellij.openapi.editor.ex.DocumentEx in project intellij-community by JetBrains.

the class RangeMarkerTest method testE13.

public void testE13() {
    DocumentEx document = (DocumentEx) EditorFactory.getInstance().createDocument(StringUtil.repeatSymbol(' ', 10));
    List<RangeMarker> mm = add(document, 5, 9, 9, 9, 7, 7, 6, 8);
    edit(document, 2, 1, 0);
    delete(mm, 0, 2);
}
Also used : DocumentEx(com.intellij.openapi.editor.ex.DocumentEx)

Aggregations

DocumentEx (com.intellij.openapi.editor.ex.DocumentEx)87 Document (com.intellij.openapi.editor.Document)12 NotNull (org.jetbrains.annotations.NotNull)8 RangeMarkerEx (com.intellij.openapi.editor.ex.RangeMarkerEx)7 Project (com.intellij.openapi.project.Project)7 TextRange (com.intellij.openapi.util.TextRange)7 LightVirtualFile (com.intellij.testFramework.LightVirtualFile)7 PsiFile (com.intellij.psi.PsiFile)6 Nullable (org.jetbrains.annotations.Nullable)5 EditorEx (com.intellij.openapi.editor.ex.EditorEx)4 VirtualFile (com.intellij.openapi.vfs.VirtualFile)4 MockVirtualFile (com.intellij.mock.MockVirtualFile)3 FoldRegion (com.intellij.openapi.editor.FoldRegion)3 PsiDocumentManager (com.intellij.psi.PsiDocumentManager)3 DocumentWindow (com.intellij.injected.editor.DocumentWindow)2 DocumentBulkUpdateListener (com.intellij.openapi.editor.ex.DocumentBulkUpdateListener)2 DocumentImpl (com.intellij.openapi.editor.impl.DocumentImpl)2 DocumentMarkupModel (com.intellij.openapi.editor.impl.DocumentMarkupModel)2 RangeHighlighter (com.intellij.openapi.editor.markup.RangeHighlighter)2 FileDocumentManagerAdapter (com.intellij.openapi.fileEditor.FileDocumentManagerAdapter)2