void () { configureFromFileText("a.xml", "<!-- Some very long and informative xml comment to trigger hard wrapping indeed. Too short? Dave, let me ask you something. Are hard wraps working? What do we live for? What ice-cream do you like? Who am I?????????????????????????????????????????????????????????????????????????????????????????????????<caret>-->"); CodeStyle.doWithTemporarySettings( getProject(), CodeStyle.getSettings(getProject()), clone -> { clone.WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN = true; CodeStyleSettingsManager.getInstance(getProject()).notifyCodeStyleSettingsChanged(); EditorTestUtil.performTypingAction(getEditor(), '?'); } ); checkResultByText("<!-- Some very long and informative xml comment to trigger hard wrapping indeed. Too short? Dave, let me ask you \n" + "something. Are hard wraps working? What do we live for? What ice-cream do you like? Who am I??????????????????????????????????????????????????????????????????????????????????????????????????-->"); }