void () { final CodeStyleSettings settings = getCurrentCodeStyleSettings(); AbstractCodeStylePropertyMapper mapper = LanguageCodeStyleSettingsProvider.forLanguage(JavaLanguage.INSTANCE).getPropertyMapper(settings); setSimple(mapper, "align_group_field_declarations", "true"); setSimple(mapper, "blank_lines_after_class_header", "1"); setSimple(mapper, "block_brace_style", "next_line"); setSimple(mapper, "indent_size", "2"); setSimple(mapper, "doc_align_param_comments", "true"); setList(mapper, "imports_layout", Arrays.asList("com.jetbrains.*", "|", "org.eclipse.bar", "$**", "$org.eclipse.foo.**")); mapper.getAccessor("repeat_annotations").setFromString(" com.jetbrains.First, com.jetbrains.Second"); final CommonCodeStyleSettings commonJavaSettings = settings.getCommonSettings(JavaLanguage.INSTANCE); final JavaCodeStyleSettings javaSettings = settings.getCustomSettings(JavaCodeStyleSettings.class); assertTrue(commonJavaSettings.ALIGN_GROUP_FIELD_DECLARATIONS); assertEquals(1, commonJavaSettings.BLANK_LINES_AFTER_CLASS_HEADER); assertEquals(CommonCodeStyleSettings.NEXT_LINE, commonJavaSettings.BRACE_STYLE); assertEquals(2, commonJavaSettings.getIndentOptions().INDENT_SIZE); assertTrue(javaSettings.JD_ALIGN_PARAM_COMMENTS); PackageEntryTable importsTable = javaSettings.getImportLayoutTable(); assertEquals(new PackageEntry(false, "com.jetbrains", false), importsTable.getEntryAt(0)); assertEquals(PackageEntry.BLANK_LINE_ENTRY, importsTable.getEntryAt(1)); assertEquals(new PackageEntry(false, "org.eclipse.bar", false), importsTable.getEntryAt(2)); assertEquals(PackageEntry.ALL_OTHER_STATIC_IMPORTS_ENTRY, importsTable.getEntryAt(3)); assertEquals(new PackageEntry(true, "org.eclipse.foo", true), importsTable.getEntryAt(4)); List<String> repeatAnno = javaSettings.getRepeatAnnotations(); assertEquals(2, repeatAnno.size()); assertEquals("com.jetbrains.First", repeatAnno.get(0)); assertEquals("com.jetbrains.Second", repeatAnno.get(1)); }