Bug 93564 Preference setting for @Override annotation
20050503 The story for adding the @Override annotation is currently abit confusing. Only the override dialog offers to add the annotation, all other override actions (quick fix, code assist) don't add it. A code style preference setting should be added to be used by all of them and the override wizatd checkbox removed. Requesting PMC approval for new the preference constant /** * A named preference that controls whether to add a override annotation for newly created methods * <p> * Value is of type <code>Boolean</code>. * </p> * @since 3.1 */ PreferenceConstants.CODEGEN_USE_OVERRIDE_ANNOTATION
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/CodeCompletionTest.java
}
		assertNotNull("no proposal for close()", closeProposal);
		IDocument doc= new Document(contents);
		if (closeProposal instanceof OverrideCompletionProposal)
			((OverrideCompletionProposal) closeProposal).setAnnotations(false);
		closeProposal.apply(doc);
		buf= new StringBuffer();
		buf.append("package test1;\n");
		buf.append("\n");
		buf.append("import java.io.IOException;\n");
		buf.append("import java.io.Writer;\n");
		buf.append("\n");
		buf.append("public class A extends Writer {\n" + 
				"    public void foo() {\n" + 
				"    }\n" + 
				"    /* (non-Javadoc)\n" + 
				"     * @see java.io.Writer#close()\n" + 
				"     */\n" + 
				"    public void close() throws IOException {\n" + 
				"        //TODO\n" + 
				"        \n" + 
				"    }//here\n" + 
				"}");
		assertEqualString(doc.get(), buf.toString());
	}
	public void testOverrideCompletion3() throws Exception {
		IPackageFragmentRoot sourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
		IPackageFragment pack1= sourceFolder.createPackageFragment("test1", false, null);
		StringBuffer buf= new StringBuffer();
		buf.append("package test1;\n");