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
"  };\n" + 
	"  // the following line contains line breaks\n// which can be preserved:\n" + 
	"  void\nbar\n()\n {}" + 
	"  void foo() {" + 
	"    ;;" + 
	"    do {} while (false);" + 
	"    for (;;) {}" + 
	"  }" + 
	"}"+ 
	"\n" + 
	"enum MyEnum {" + 
	"    UNDEFINED(0) { }" + 
	"}" + 
	"enum EmptyEnum { }";
	
	private final String [] NOTINSERT_INSERT= {
	    JavaCore.DO_NOT_INSERT,
	    JavaCore.INSERT
	};
	
	protected CheckboxPreference fThenStatementPref, fSimpleIfPref;
	private CompilationUnitPreview fPreview;
	public NewLinesTabPage(ModifyDialog modifyDialog, Map workingValues) {
		super(modifyDialog, workingValues);
	}
	protected void doCreatePreferences(Composite composite, int numColumns) {
		
		final Group newlinesGroup= createGroup(numColumns, composite, FormatterMessages.getString("NewLinesTabPage.newlines_group.title")); 
		createPref(newlinesGroup, numColumns, "NewLinesTabPage.newlines_group.option.empty_class_body", DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_TYPE_DECLARATION, NOTINSERT_INSERT); 
		createPref(newlinesGroup, numColumns, "NewLinesTabPage.newlines_group.option.empty_anonymous_class_body", DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_ANONYMOUS_TYPE_DECLARATION, NOTINSERT_INSERT);