This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 154258 - sort suggested import class list by libs in project
Summary: sort suggested import class list by libs in project
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Classpath (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P4 blocker (vote)
Assignee: Tomas Zezula
Depends on:
Reported: 2008-12-01 11:59 UTC by gimbal
Modified: 2011-09-24 19:39 UTC (History)
1 user (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description gimbal 2008-12-01 11:59:35 UTC
When using "fix imports", when there are multiple instances of the same classname in the classpath, the editor will
popup a dialog where you can choose the exact class to import from all different packages. Example: in my project I use
XOM and when I fix imports, for most of the classes (Element, Node, Attribute, etc.) I get more than 4 and sometimes
even 8 or more different hits for the same names.

Name clashing is all too common among the great number of Java packages available, XOM is not an isolated example. It
would make things a little easier for me, and I suspect a lot of other people, if the combo boxes of suggested classes
had classes from packages I have specifically added to my project (jar, library or project dependency) at the top of
these lists. This will bring down the need to select the correct class in the combo boxes to a bare minimum.
Comment 1 tomwheeler 2011-09-24 19:39:33 UTC
See also my comments in #57853 -  Fix Import should default to favorite classes.