Bug 97278 [code manipulation] Add constructor from superclass proposes wrong constructor
RC1 public abstract class A<T> { public T fT; public A(T ft) { super(); // TODO Auto-generated constructor stub fT = ft; } } class Sub<E> extends A<String> { public Sub(String ft) { super(ft); // TODO Auto-generated constructor stub } } - run add constructor from superclass inside sub observe: the dialog offeres Object(), however generate a default constructor results in a compile error since A doesn't provide a default constructor.
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/AddUnimplementedConstructorsTest.java
/*
	 * basic test: test an Interface to make sure no exception is thrown
	 */
	public void testNoConstructorsToOverrideWithInterface() throws Exception {
		fJavaProject= JavaProjectHelper.createJavaProject("DummyProject", "bin");
		assertNotNull(JavaProjectHelper.addRTJar(fJavaProject));
		IPackageFragmentRoot root= JavaProjectHelper.addSourceContainer(fJavaProject, "src");
		fPackage= root.createPackageFragment("ibm.util", true, null);
		ICompilationUnit cu= fPackage.getCompilationUnit("A.java");
		fClassA= cu.createType("public interface A {\n}\n", null, true, null);
		ICompilationUnit cu2= fPackage.getCompilationUnit("Test1.java");
		IType testClass= cu2.createType("public class Test1 implements A {\n}\n", null, true, null);
		testClass.createMethod("public Test1(){}\n", null, true, null);
		AddUnimplementedConstructorsOperation op= createOperation(testClass);
		op.setOmitSuper(false);
		op.setVisibility(Modifier.PUBLIC);
		op.run(new NullProgressMonitor());
		JavaModelUtil.reconcile(testClass.getCompilationUnit());
		IMethod[] existingMethods= testClass.getMethods();
		checkMethods(new String[] { "Test1"}, existingMethods); 
		StringBuffer buf= new StringBuffer();
		buf.append("public class Test1 implements A {\n");
		buf.append("\n");
		buf.append("    public Test1(){}\n");
		buf.append("}\n");
		compareSource(buf.toString(), testClass.getSource());
	}
	/*
	 * nothing found with default constructor
	 */