void (final String text) { myFixture.configureByText(getTestName(true) + ".java", ""); final DocumentImpl document = (DocumentImpl)myFixture.getEditor().getDocument(); document.setAcceptSlashR(true); ApplicationManager.getApplication().runWriteAction(() -> document.setText(text)); myFixture.doHighlighting(); }