Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 104712 - Code completion popup should abbreviate Types rather than methods/variables
Code completion popup should abbreviate Types rather than methods/variables
Product: java
Classification: Unclassified
Component: Editor
All All
: P4 (vote)
: 6.x
Assigned To: Dusan Balek
: 112341 (view as bug list)
Depends on:
Blocks: 152194
  Show dependency treegraph
Reported: 2007-05-24 10:06 UTC by Erno Mononen
Modified: 2012-10-26 07:58 UTC (History)
1 user (show)

See Also:

Screenshot of CC popup where a name is truncated in favor of a return type. The full name would have been "getDisplayStringFn()". (14.39 KB, image/png)
2008-11-19 16:52 UTC, matthies
Screenshot of the problem with build 200904150201. (48.60 KB, image/png)
2009-04-15 19:19 UTC, matthies

Note You need to log in before you can comment on or make changes to this bug.
Description Erno Mononen 2007-05-24 10:06:47 UTC
NetBeans IDE Dev (Build 070521)
1.5.0_11; Java HotSpot(TM) Client VM 1.5.0_11-b03
Linux version 2.6.20-15-386 running on i386
en_US (nb); UTF-8

The code completion popup window displays the return value instead of the name 
for the javax.lang.model.element.AnnotationMirror#getElementValues() method, 
i.e. you can see only "Map<? extends ... >' in the popup, not the name.
Comment 1 Jiri Prox 2007-05-24 10:18:38 UTC
Caused by the length of return type. There is no space left for the method name
Comment 2 Erno Mononen 2007-05-24 10:43:38 UTC
Right, the problem seems to exist anywhere where the return type is long 
enough. Rather confusing since the methods with long return types are also 
incorrectly sorted (they seem to be sorted alphabetically according to their 
return type, not their name). Would be nice if the popup would scale 
Comment 3 Dusan Balek 2007-10-19 08:50:34 UTC
*** Issue 112341 has been marked as a duplicate of this issue. ***
Comment 4 matthies 2007-10-19 15:35:52 UTC
Please note the suggestion in issue 112341 to give the name and parameter list precedence over the (return) type. This 
might be much easier to implement, as a first step, than scaling of the popup.
Comment 5 Dusan Balek 2008-11-14 15:13:12 UTC
Note that horizontal scaling has been implemented some time ago.
Comment 6 matthies 2008-11-19 16:50:12 UTC
I'm not sure how horizontal scaling is supposed to work, but I just tested this in NB 6.5 final and still get names 
that are cut off in favor of the return type. See the next attached screenshot.
Comment 7 matthies 2008-11-19 16:52:40 UTC
Created attachment 73926 [details]
Screenshot of CC popup where a name is truncated in favor of a return type. The full name would have been "getDisplayStringFn()".
Comment 8 Sergey Petrov 2009-04-10 13:18:07 UTC
can't reproduce in 090409,
made inner class like:
    public static class BBB
        public static Map<Map<Map<String,String>,Map<String,String>>,Map<Map<String,String>,Map<String,String>>>
            return null;

and tried to call this method, first - name is shown first in completion list, and second this list is wide enough to
show return type also.
Comment 9 matthies 2009-04-15 19:17:24 UTC
It still occurs when the CC popup is not wide enough. I'm attaching a screenshot with your example on my display 
(1280×1024), with maximized NetBeans window. Note how only "..." is shown for the method name.
Comment 10 matthies 2009-04-15 19:19:37 UTC
Created attachment 80183 [details]
Screenshot of the problem with build 200904150201.
Comment 11 Sergey Petrov 2009-05-13 14:02:01 UTC
in my opinion it's not exactly the same as initial issue, but ok, seems to be an issue in the same area.
Comment 12 David Strupl 2012-10-25 13:41:43 UTC
Bug prior to 7.0, not touched for the last 2 years --> P4.
Comment 13 David Strupl 2012-10-26 07:58:11 UTC
Sounds like an enh request to me.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo