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
IPackageFragment pack= getPackageFragment();
		if (pack == null) {
			pack= root.getPackageFragment(""); 
		}
		
		if (!pack.exists()) {
			String packName= pack.getElementName();
			pack= root.createPackageFragment(packName, true, null);
		}		
		
		monitor.worked(1);
		
		String clName= getTypeName();
		
		boolean isInnerClass= isEnclosingTypeSelected();
		
		IType createdType;
		ImportsStructure imports;
		int indent= 0;
		String[] prefOrder= ImportOrganizePreferencePage.getImportOrderPreference();
		int threshold= ImportOrganizePreferencePage.getImportNumberThreshold();			
		
		String lineDelimiter= null;	
		if (!isInnerClass) {
			lineDelimiter= System.getProperty("line.separator", "\n"); 
			
			String packStatement= pack.isDefaultPackage() ? "" : "package " + pack.getElementName() + ";" + lineDelimiter + lineDelimiter; 
			ICompilationUnit parentCU= pack.createCompilationUnit(clName + ".java", packStatement, false, new SubProgressMonitor(monitor, 2)); 
			imports= new ImportsStructure(parentCU, prefOrder, threshold, false);