Search in sources :

Example 61 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 62 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 63 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)

Example 64 with DocumentEx

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

the class RangeMarkerTest method testE16.

public void testE16() {
    DocumentEx document = (DocumentEx) EditorFactory.getInstance().createDocument(StringUtil.repeatSymbol(' ', 100));
    List<RangeMarker> mm = add(document, 29, 63, 47, 52, 72, 86, 19, 86, 13, 55, 18, 57, 92, 95, 83, 99, 41, 80, 53, 85, 10, 30, 28, 44, 23, 32, 70, 95, 14, 28);
    edit(document, 67, 5, 0, 1, 0, 4);
    delete(mm, 11);
}
Also used : DocumentEx(com.intellij.openapi.editor.ex.DocumentEx)

Example 65 with DocumentEx

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

the class RangeMarkerTest method testX.

public void testX() {
    RangeMarkerEx marker1 = createMarker(StringUtil.repeatSymbol(' ', 10), 3, 6);
    DocumentEx document = (DocumentEx) marker1.getDocument();
    document.createRangeMarker(2, 3);
    document.createRangeMarker(3, 8);
    document.createRangeMarker(7, 9);
    RangeMarkerEx r1 = (RangeMarkerEx) document.createRangeMarker(6, 8);
    r1.dispose();
    marker1.dispose();
}
Also used : DocumentEx(com.intellij.openapi.editor.ex.DocumentEx) RangeMarkerEx(com.intellij.openapi.editor.ex.RangeMarkerEx)

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