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
private String getInterfaceLabel() {
	    if (fTypeKind != INTERFACE_TYPE)
	        return NewWizardMessages.getString("NewTypeWizardPage.interfaces.class.label"); 
	    return NewWizardMessages.getString("NewTypeWizardPage.interfaces.ifc.label"); 
	}
	
	/**
	 * Initializes all fields provided by the page with a given selection.
	 * 
	 * @param elem the selection used to initialize this page or <code>
	 * null</code> if no selection was available
	 */
	protected void initTypePage(IJavaElement elem) {
		String initSuperclass= "java.lang.Object"; 
		ArrayList initSuperinterfaces= new ArrayList(5);
		IPackageFragment pack= null;
		IType enclosingType= null;
				
		if (elem != null) {
			
			pack= (IPackageFragment) elem.getAncestor(IJavaElement.PACKAGE_FRAGMENT);
			IType typeInCU= (IType) elem.getAncestor(IJavaElement.TYPE);
			if (typeInCU != null) {
				if (typeInCU.getCompilationUnit() != null) {
					enclosingType= typeInCU;
				}
			} else {
				ICompilationUnit cu= (ICompilationUnit) elem.getAncestor(IJavaElement.COMPILATION_UNIT);
				if (cu != null) {
					enclosingType= cu.findPrimaryType();