Bug 32478 Create inner subclass generate invalid import
When we have a class with an inner protected class like that, package test1; public class Parent { protected class Inner { } } and an other one like that package test2; import test1.Parent; public class Child extends Parent { } and we want to generate a inner class in Child that extends the inner class Protected.Inner, we obtain package test2; import test1.Parent; import test1.Parent.Inner; public class Child extends Parent { public class Generated extends Inner { } } but the import statement is not valid. It should not be generated.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewTypeWizardPage.java
String clName= getTypeName();
			
			boolean isInnerClass= isEnclosingTypeSelected();
			
			IType createdType;
			ImportsStructure imports;
			int indent= 0;
	
			IPreferenceStore store= PreferenceConstants.getPreferenceStore();
			String[] prefOrder= JavaPreferencesSettings.getImportOrderPreference(store);
			int threshold= JavaPreferencesSettings.getImportNumberThreshold(store);			
			
			String lineDelimiter= null;	
			if (!isInnerClass) {
				lineDelimiter= System.getProperty("line.separator", "\n"); 
										
				ICompilationUnit parentCU= pack.createCompilationUnit(clName + ".java", "", false, new SubProgressMonitor(monitor, 2)); 
				
				createdWorkingCopy= parentCU.getWorkingCopy(null);
				
				
				String content= CodeGeneration.getCompilationUnitContent(createdWorkingCopy, null, "", lineDelimiter); 
				if (content != null) {
					createdWorkingCopy.getBuffer().setContents(content);
				}
							
				imports= new ImportsStructure(createdWorkingCopy, prefOrder, threshold, true);
				
				imports.addImport(pack.getElementName(), getTypeName());