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 124283 - Don't list multiple overloads of the same method name in code completion for static imports
Summary: Don't list multiple overloads of the same method name in code completion for ...
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-19 18:01 UTC by matthies
Modified: 2013-10-30 22:03 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description matthies 2007-12-19 18:01:05 UTC
In the code completion popup for static imports, if a static method has multiple overloads, each overload is listed as 
a separate item in the popup, altough overloads with the same name are all equivalent in this context. Static imports 
can only import a complete overload set. A single overload cannot be imported selectively. Therefore it would me more 
appropriate to restrict the CC list to one entry per overload set, i.e. only one entry per method name. I keep coming 
across cases were it would make the list significantly more concise and thus more convenient.

For example, imagine a class StandardOut that has the same methods as java.io.PrintStream, only that the methods are 
static (and supposedly print to stdout.) Then when invoking code completion on "import static StandardOut.", all 9 
overloads of 'print' and all 10 overloads of 'println' will be listed. To import 'println' (as in "import static 
StandardOut.println;"), one either has to cursor over all the 'print' overloads to get to 'println', or one has to 
type "printl" to exclude the 'print' overloads from the list. In either case, it defeats the purpose of having code 
completion to save keystrokes here. It also gives the false impression that one could select a specific overload for 
importation (as in "import static StandardOut.println(int);", which is not possible).