Community
Participate
Working Groups
Created attachment 159360 [details] AddImportTest#testRemoveImports3() HEAD after bug 235253 ImportRewrite#removeImport(String) does not work with setUseContextToFilterImplicitImports(true). The attached test case works fine without imports.setUseContextToFilterImplicitImports(true); but fails when this is enabled. I've already outlined this scenario in bug 194358 comment #68: > imports.removeImport("pack.List"); > > This should work no matter whether a package "pack" is available or not. I have > not looked into the code in depth, but I guess > ImportRewriteAnalyzer#removeImport(String, boolean) should try all possible > interpretations of "qualifier" before it fails (no matter what packages are > currently available). This is blocking progress on bug 295638.
Created attachment 159369 [details] Proposed fix + regression test I copied the new test locally.
Released for 3.6M6. Added regression test: org.eclipse.jdt.core.tests.rewrite.describing.ImportRewriteTest#testRemoveImports3
Verified for 3.6M6 using build I20100307-2000.