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
/**
	 * Class used in stub creation routines to add needed imports to a 
	 * compilation unit.
	 */
	public static class ImportsManager {
		private IImportsStructure fImportsStructure;
		 ImportsManager(IImportsStructure structure) {
			fImportsStructure= structure;
		}
		 IImportsStructure getImportsStructure() {
			return fImportsStructure;
		}
				
		/**
		 * Adds a new import declaration that is sorted in the existing imports.
		 * If an import already exists or the import would conflict with another import
		 * of an other type with the same simple name  the import is not added.
		 * 
		 * @param qualifiedTypeName The fully qualified name of the type to import
		 * (dot separated)
		 * @return Retuns the simple type name that can be used in the code or the
		 * fully qualified type name if an import conflict prevented the import
		 */				
		public String addImport(String qualifiedTypeName) {
			return fImportsStructure.addImport(qualifiedTypeName);
		}
	}