void () { mySettings.WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN = true; mySettings.setDefaultRightMargin(30); CommonCodeStyleSettings.IndentOptions indentOptions = mySettings.getIndentOptions(null); indentOptions.USE_TAB_CHARACTER = true; indentOptions.INDENT_SIZE = 4; indentOptions.TAB_SIZE = 4; indentOptions.CONTINUATION_INDENT_SIZE = 4; UISettings.getInstance().setFontFace("Tahoma"); UISettings.getInstance().setFontSize(11); EditorColorsScheme scheme = EditorColorsManager.getInstance().getGlobalScheme(); scheme.setEditorFontName("Tahoma"); scheme.setEditorFontSize(11); configureByFile("/codeInsight/editing/before" + getTestName(false) + ".java"); backspace(); int offset = getEditor().getDocument().getText().indexOf("comment"); getEditor().getCaretModel().moveToOffset(offset + "comment".length()); for (int i = 0; i < 20; i++) { type(' '); } // Check that no unnecessary line feed is introduced. assertEquals(4, getEditor().getDocument().getLineCount()); }