Community
Participate
Working Groups
HEAD - default Organize Imports settings - have this CU: package xy; import java.util.*; public class Try { public static void main(String[] args) { HashMap h; Map.Entry e= null; Entry e2= null; System.out.println("hello"); } } - set caret into "Entry" on the line with the compile error - Source > Add Import => expected: "import java.util.Map.Entry;" should be added => was: no change I think the problem is that java.util.Map.Entry now belongs to the java.util group, but that should only be relevant for grouping, but it doesn't mean that java.util.* actually imports java.util.Map.Entry.
Created attachment 163430 [details] Proposed fix
Released for 3.6M7. Markus, let me know if you find anything wrong. Besides the awkward use of the old behavior, it seems to work as expected.
Added regression test: org.eclipse.jdt.core.tests.rewrite.describing.ImportRewriteTest#testAddImports6
Verified for 3.6M7 using build I20100424-2000.