Community
Participate
Working Groups
HEAD, follow-up to bug 306568 - default Organize Imports settings - have this CU: package xy; import java.util.*; import java.util.Map.Entry; public class Try { public static void main(String[] args) { HashMap h; Map.Entry e= null; Entry e2= null; PrintWriter pw; System.out.println("hello"); } } - set caret into "PrintWriter" - Source > Add Import => "import java.io.PrintWriter;" gets added (good) => "import java.util.Map.Entry;" gets removed (not good)
Looks fixed to me in HEAD of ImportRewriteAnalyzer (and it fixes bug 306571).
Reopening, I guess you kept this open to make sure you have a regression test for it.
I released it yesterday, but I forgot to close the bug. Released for 3.6M7. Added regression test: org.eclipse.jdt.core.tests.rewrite.describing.ImportRewriteTest#testAddImports7
Verified for 3.6M7 using build I20100424-2000.
Verified.