void () { DocumentImpl doc = new DocumentImpl("0123456789\n123456789\n23456789"); Editor editor = EditorFactory.getInstance().createEditor(doc); try { final FoldingModel model = editor.getFoldingModel(); model.runBatchFoldingOperation(() -> { addAndCollapseFoldRegion(model, 0, 8, "/*...*/"); addAndCollapseFoldRegion(model, 10, 12, "/*...*/"); }); assertEquals(10, editor.logicalPositionToOffset(new LogicalPosition(0, 10))); for (int line = 0; line <= 3; line++) { for (int column = 0; column <= 100; column++) { LogicalPosition log = new LogicalPosition(line, column); editor.logicalToVisualPosition(log); } } } finally { EditorFactory.getInstance().releaseEditor(editor); } }