Bug 23447 Java super-class name does not carry on to dialogue box [code manipulation]
From WSAD Customer: When creating a new Java Class, when an incomplete super-classname is entered in the dialogue box and then the Browse button is clicked, nothing that appears in the Choose a type field. Ideally, it should have the incomplete name typed in the previous super-class field. How to recreate : In the Java perspective, - File -> New ->Class - In the resulting dialogue box, type "JPan" in the 'Superclass' field. Now click on Browse. - Ideally, the dialogue box that just opened up should already have JPan written in it and hence the list of selectable classes would be shortened.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewTypeWizardPage.java
imports.addImport(pack.getElementName(), getTypeName());
			
			String content= constructTypeStub(new ImportsManager(imports), lineDelimiter, parentCU);
			createdType= parentCU.createType(content, null, false, new SubProgressMonitor(monitor, 3));
		} else {
			IType enclosingType= getEnclosingType();
			
			
			
			IType workingCopy= (IType) EditorUtility.getWorkingCopy(enclosingType);
			if (workingCopy != null) {
				enclosingType= workingCopy;
			}
			ICompilationUnit parentCU= enclosingType.getCompilationUnit();
			imports= new ImportsStructure(parentCU, prefOrder, threshold, true);
			
			IType[] topLevelTypes= parentCU.getTypes();
			for (int i= 0; i < topLevelTypes.length; i++) {
				imports.addImport(topLevelTypes[i].getFullyQualifiedName('.'));
			}
			
			lineDelimiter= StubUtility.getLineDelimiterUsed(enclosingType);
			String content= constructTypeStub(new ImportsManager(imports), lineDelimiter, parentCU);
			IJavaElement[] elems= enclosingType.getChildren();
			IJavaElement sibling= elems.length > 0 ? elems[0] : null;
			
			createdType= enclosingType.createType(content, sibling, false, new SubProgressMonitor(monitor, 1));
		
			indent= StubUtility.getIndentUsed(enclosingType) + 1;
		}