void () { org.jdom.Element rootElement = new Element("option"); Element langCodeStyle = new Element("codeStyleSettings"); langCodeStyle.setAttribute("language", "XML"); langCodeStyle.addContent(createOption("IF_BRACE_FORCE", "3")); Element indentOptionsElement = new Element("indentOptions"); indentOptionsElement.addContent(createOption("INDENT_SIZE", "2")); indentOptionsElement.addContent(createOption("CONTINUATION_INDENT_SIZE", "3")); indentOptionsElement.addContent(createOption("TAB_SIZE", "2")); indentOptionsElement.addContent(createOption("USE_TAB_CHARACTER", "true")); langCodeStyle.addContent(indentOptionsElement); rootElement.addContent(langCodeStyle); CodeStyleSettings settings = CodeStyle.createTestSettings(); settings.readExternal(rootElement); CommonCodeStyleSettings langSettings = settings.getCommonSettings(XMLLanguage.INSTANCE); assert langSettings != null; CommonCodeStyleSettings.IndentOptions indentOptions = langSettings.getIndentOptions(); assert indentOptions != null; assertEquals(2, indentOptions.INDENT_SIZE); assertEquals(3, indentOptions.CONTINUATION_INDENT_SIZE); assertEquals(2, indentOptions.TAB_SIZE); assertTrue(indentOptions.USE_TAB_CHARACTER); assertEquals(3, langSettings.IF_BRACE_FORCE); }