void () { FoldingModelImpl model = (FoldingModelImpl)getEditor().getFoldingModel(); model.runBatchFoldingOperation( () -> { FoldRegion f1 = model.addFoldRegion(1, 10, "..."); assertNotNull(f1); FoldRegion f2 = model.addFoldRegion(5, 11, "..."); assertNull(f2); FoldRegion c1 = model.createFoldRegion(2, 9, "...", null, false); assertNotNull(c1); FoldRegion c2 = model.createFoldRegion(4, 12, "...", null, false); assertNull(c2); }); }