void () { initText("something"); DocumentEx document = (DocumentEx)getEditor().getDocument(); runWriteCommand(() -> DocumentUtil.executeInBulk(document, ()-> document.setText("something\telse"))); checkResultByText("something\telse"); }