Bug 82461 [5.0] Unconventional formatting of annotations in ASTRewrite
20050104: Adding a MarkerAnnotation ast node to a method declaration with visibility modifiers results in unconventional formatting of the modifier ast node list. Example: public int foo(); Adding marker annotation @Override results in: @Override public int foo(); The formatting should be: @Override public int foo();
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/NewLinesTabPage.java
createPref(newlinesGroup, numColumns, "NewLinesTabPage.newlines_group.option.empty_method_body", DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_METHOD_BODY, NOTINSERT_INSERT); 
		createPref(newlinesGroup, numColumns, "NewLinesTabPage.newlines_group.option.empty_block", DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_BLOCK, NOTINSERT_INSERT); 
		createPref(newlinesGroup, numColumns, "NewLinesTabPage.newlines_group.option.empty_enum_declaration", DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_ENUM_DECLARATION, NOTINSERT_INSERT); 
		createPref(newlinesGroup, numColumns, "NewLinesTabPage.newlines_group.option.empty_enum_constant", DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_ENUM_CONSTANT, NOTINSERT_INSERT); 
		createPref(newlinesGroup, numColumns, "NewLinesTabPage.newlines_group.option.empty_end_of_file", DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AT_END_OF_FILE_IF_MISSING, NOTINSERT_INSERT); 
		
		final Group arrayInitializerGroup= createGroup(numColumns, composite, FormatterMessages.getString("NewLinesTabPage.arrayInitializer_group.title")); 
		createPref(arrayInitializerGroup, numColumns, "NewLinesTabPage.array_group.option.after_opening_brace_of_array_initializer", DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_OPENING_BRACE_IN_ARRAY_INITIALIZER, NOTINSERT_INSERT); 
		createPref(arrayInitializerGroup, numColumns, "NewLinesTabPage.array_group.option.before_closing_brace_of_array_initializer", DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_CLOSING_BRACE_IN_ARRAY_INITIALIZER, NOTINSERT_INSERT); 
		
		final Group emptyStatementsGroup= createGroup(numColumns, composite, FormatterMessages.getString("NewLinesTabPage.empty_statement_group.title")); 
		createPref(emptyStatementsGroup, numColumns, "NewLinesTabPage.emtpy_statement_group.option.empty_statement_on_new_line", DefaultCodeFormatterConstants.FORMATTER_PUT_EMPTY_STATEMENT_ON_NEW_LINE, FALSE_TRUE); 
	}
	
	protected void initializePage() {
	    fPreview.setPreviewText(PREVIEW);
	}
	
    protected JavaPreview doCreateJavaPreview(Composite parent) {
        fPreview= new CompilationUnitPreview(fWorkingValues, parent);
        return fPreview;
    }
    protected void doUpdatePreview() {
        fPreview.update();
    }
	private CheckboxPreference createPref(Composite composite, int numColumns, String messagesKey, String key, String [] values) {
		return createCheckboxPref(composite, numColumns, FormatterMessages.getString(messagesKey), key, values);
	}
}