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 204862 - Better handling of ambiguous classes
Summary: Better handling of ambiguous classes
Alias: None
Product: editor
Classification: Unclassified
Component: Hints & Annotations (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Milutin Kristofic
Depends on:
Reported: 2011-11-08 20:22 UTC by javydreamercsw
Modified: 2016-07-10 18:47 UTC (History)
2 users (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description javydreamercsw 2011-11-08 20:22:59 UTC
Product Version = NetBeans IDE Dev (Build 201111070600)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.7.0_01
Runtime = Java HotSpot(TM) Client VM 21.1-b02

While working with Vaadin I came to a scenario where java.awt and com.vaadin.ui share common names (i.e. Button). Code completion generates more ambiguous code instead of asking for selecting from a set of options like it does when importing.

For example this code:

new Button("Login",new ClickListener());

Both Button and ClickListener are underlined saying that they are ambiguous. it would be nice to have some hints to fix that.

Then you get a hint for assigning return value to a variable which leads to ambiguity again. another for ClickListener being abstract to implement missing methods create more ambiguity, and so on.
Comment 1 markiewb 2012-12-08 12:51:37 UTC
You could exclude 'java.awt' for code completion. See options dialog "Editor > Code completion > Java" .
Comment 2 Martin Balin 2016-07-07 07:30:16 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 3 markiewb 2016-07-10 18:47:31 UTC
Still valid in 8.2 dev 
Product Version: NetBeans IDE Dev (Build 201607100002)