Bug 26746 Organize Imports leaves an unnecessary import of inner interface [code manipulation]
The compiler warns about an unnecessary import, while the organize imports does not remove it. This can be reproduced with these sources: MyClass.java: import MyInterface.MyInnerInterface; public class MyClass implements MyInterface{ public MyInnerInterface myMethod() { return null; } } MyInterface.java: public interface MyInterface { public interface MyInnerInterface { } }
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/ImportOrganizeTest.java
body.append(name); body.append(" a"); body.append(i); body.append(";\n");
		}
		body.append("}\n");
		IPackageFragment pack1= sourceFolder.createPackageFragment("pack1", false, null);
		StringBuffer buf= new StringBuffer();
		buf.append("package pack1;\n");
		buf.append("\n");
		buf.append(body.toString());
		ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
		IChooseImportQuery query= createQuery("C", new String[] {}, new int[] {});
		OrganizeImportsOperation op= new OrganizeImportsOperation(cu, order, threshold, false, true, true, query);
		op.run(null);
		buf= new StringBuffer();
		buf.append("package pack1;\n");
		buf.append("\n");
		buf.append("import com.misc.Class5;\n");
		buf.append("\n");
		buf.append("import com.foreigncompany.Class2;\n");
		buf.append("import com.foreigncompany.Class3;\n");
		buf.append("\n");
		buf.append("import com.mycompany.Class1;\n");
		buf.append("import com.mycompany.Class4;\n");
		buf.append("\n");
		buf.append(body.toString());
		assertEqualString(cu.getSource(), buf.toString());
	}
	
		
}