void (int startLine, int endLine) { doCommonTest(() -> {}, codeStyleManager -> { Editor editor = myFixture.getEditor(); int start = editor.logicalPositionToOffset(new LogicalPosition(startLine, 0)); int end = editor.logicalPositionToOffset(new LogicalPosition( endLine, 0)); codeStyleManager.reformatRange(myFixture.getFile(), start, end); }); }