Bug 83397 Problem with inheritance from Generics [code generation]
Hi, I used the class wizard to create a new class (HashMapTest) that extends HashMap, with "Constructors from superclass" selected. The wizard created this constructor: public HashMapTest(Map< ? extends K, ? extends V> arg0) { super(arg0); } the compiler gives errors that K and V cannot be resolved into types. The same occur with methods whether created by the wizard or not. I am using the 3.1M4 stable build with Sun J2SE 5.0. Compiler compliance is set to 5.0 default. Good luck Roger
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewTypeWizardPage.java
return null;
	}	
	
	/**
	 * Creates the bodies of all unimplemented methods and constructors and adds them to the type.
	 * Method is typically called by implementers of <code>NewTypeWizardPage</code> to add
	 * needed method and constructors.
	 * 
	 * @param type the type for which the new methods and constructor are to be created
	 * @param doConstructors if <code>true</code> unimplemented constructors are created
	 * @param doUnimplementedMethods if <code>true</code> unimplemented methods are created
	 * @param imports an import manager to add all needed import statements
	 * @param monitor a progress monitor to report progress
	 * @return the created methods.
	 * @throws CoreException thrown when the creation fails.
	 */
	protected IMethod[] createInheritedMethods(IType type, boolean doConstructors, boolean doUnimplementedMethods, ImportsManager imports, IProgressMonitor monitor) throws CoreException {
		ArrayList newMethods= new ArrayList();
		ITypeHierarchy hierarchy= null;
		CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings(type.getJavaProject());	
		if (doConstructors) {
			hierarchy= type.newSupertypeHierarchy(monitor);
			IType superclass= hierarchy.getSuperclass(type);
			if (superclass != null) {
				String[] constructors= StubUtility.evalConstructors(type, superclass, settings, imports.fImportsStructure);
				if (constructors != null) {
					for (int i= 0; i < constructors.length; i++) {
						newMethods.add(constructors[i]);
					}
				}