void () { initText("so<caret>me long text"); final FoldRegion innerRegion = addCollapsedFoldRegion(0, 4, "..."); final FoldRegion outerRegion = addCollapsedFoldRegion(0, 9, "..."); runFoldingOperation(() -> { getEditor().getFoldingModel().removeFoldRegion(outerRegion); getEditor().getFoldingModel().removeFoldRegion(innerRegion); }); checkResultByText("so<caret>me long text"); }