void () { int oldValue = mySettings.getDefaultRightMargin(); boolean oldMarginValue = mySettings.WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN; mySettings.setDefaultRightMargin(80); mySettings.WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN = true; try { configureByFile("/codeInsight/editing/before" + getTestName(false) + ".java"); for (int i = 0; i != 47; ++i) { type(' '); } checkResultByFile("/codeInsight/editing/after" + getTestName(false) + ".java"); } finally { mySettings.setDefaultRightMargin(oldValue); mySettings.WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN = oldMarginValue; } }