Community
Participate
Working Groups
Build Identifier: 20110916-0149 This is a minor issue, but one that can actually create some very frustrating usability issues: If I auto-complete a class name (e.g. "Map") to automatically generate the import statement, Eclipse has a very annoying habit of suggesting obscure com.sun classes over core java classes. If a user is working quickly, it is very easy to end up with an import of "com.sun.xml.internal.xsom.impl.scd.Iterators.Map" rather than "java.util.Map" if you don't take the time to select the second or third suggestion. I realize this might seem like a real corner case, but I think there could be a big UX gain to making suggestions always prioritize core Java classes, unless there is a match within the user's own workspace. People generally avoid type names that overlap with core Java names, so I think this heuristic will be more likely to place the correct suggestion first, rather than the current approach, which seems to be purely alphabetical. Reproducible: Always Steps to Reproduce: 1. Create a new Java class 2. Begin a new variable declaration by typing "Map" 3. Type ctrl-space to activate auto suggest. 4. Note that a "com.sun" class is suggested over "java.util.Map"
We do filter the com.sun classes from the JRE. If you add additional stuff (like I guess the tools.jar in your case), then you need to add the filters yourself. There are two ways to do it: 1) On the Java > Appearance > Type Filters page add e.g. "com.sun.*". 2) On the 'Libraries' page of your projects Java build path' properties, add an exclusion rule to your JAR. Mark it as 'Forbidden' to filter it completely or as 'Discouraged' to allow its use but show it after other proposals, and mark it with a warning.
Thanks so much for the feedback. Apologies for the dup bug!