void (Project project) { CodeStyleSettings settings = CodeStyle.createTestSettings(); CommonCodeStyleSettings javaSettings = settings.getCommonSettings(JavaLanguage.INSTANCE); javaSettings.BLANK_LINES_AROUND_FIELD = 0; javaSettings.BLANK_LINES_AROUND_METHOD = 1; javaSettings.BLANK_LINES_AROUND_CLASS = 0; javaSettings.KEEP_BLANK_LINES_BEFORE_RBRACE = 2; javaSettings.KEEP_BLANK_LINES_IN_CODE = 2; javaSettings.KEEP_BLANK_LINES_IN_DECLARATIONS = 2; CodeStyleSettingsManager.getInstance(project).setTemporarySettings(settings); }