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
StubUtility.setCodeTemplate(CodeTemplateContextType.CONSTRUCTORCOMMENT_ID, comment.toString(), null);
		StubUtility.setCodeTemplate(CodeTemplateContextType.CONSTRUCTORSTUB_ID, "${body_statement}\n// TODO", null);
		fSettings= JavaPreferencesSettings.getCodeGenerationSettings(null);
		fSettings.createComments= true;
	}
	private boolean nameContained(String methName, IJavaElement[] methods) {
		for (int i= 0; i < methods.length; i++) {
			if (methods[i].getElementName().equals(methName)) {
				return true;
			}
		}
		return false;
	}
	/**
	 * Creates a new test Java project.
	 */
	protected void setUp() {
		initCodeTemplates();
	}
	protected void tearDown() throws Exception {
		JavaProjectHelper.delete(fJavaProject);
		fJavaProject= null;
		fPackage= null;
		fClassA= null;
	}
	/*
	 * basic test: test with default constructor only
	 */
	public void testDefaultConstructorToOverride() throws Exception {
		fJavaProject= JavaProjectHelper.createJavaProject("DummyProject", "bin");