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
"java.util.zip.ZipFile",
		});	
	}
		
	public void test4() throws Exception {
		File junitSrcArchive= JavaTestPlugin.getDefault().getFileInPlugin(JavaProjectHelper.JUNIT_SRC);
		assertTrue("junit src not found", junitSrcArchive != null && junitSrcArchive.exists());
		ZipFile zipfile= new ZipFile(junitSrcArchive);
		JavaProjectHelper.addSourceContainerWithImport(fJProject1, "src", zipfile);
		ICompilationUnit cu= (ICompilationUnit) fJProject1.findElement(new Path("junit/textui/TestRunner.java"));
		assertNotNull("TestRunner.java", cu);
		
		String[] order= new String[0];
		IChooseImportQuery query= createQuery("TestRunner", new String[] {}, new int[] {});
		
		OrganizeImportsOperation op= new OrganizeImportsOperation(cu, order, 99, false, true, true, query);
		op.run(null);
		
		assertImports(cu, new String[] {
			"java.io.PrintStream",
			"java.util.Enumeration",
			"junit.framework.AssertionFailedError",
			"junit.framework.Test",
			"junit.framework.TestFailure",
			"junit.framework.TestResult",
			"junit.framework.TestSuite",
			"junit.runner.BaseTestRunner",
			"junit.runner.StandardTestSuiteLoader",
			"junit.runner.TestSuiteLoader",
			"junit.runner.Version"