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 229233 - Wrong auto-complete for java.util.List
Summary: Wrong auto-complete for java.util.List
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.4
Hardware: PC Windows 7 x64
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-30 18:24 UTC by ecerichter
Modified: 2013-05-22 02:37 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (149.56 KB, text/plain)
2013-04-30 18:24 UTC, ecerichter
Details
Screenshot of the issue (22.85 KB, image/png)
2013-04-30 18:25 UTC, ecerichter
Details
Related issue with auto complete: local variable is not shown, only its methods (67.04 KB, image/png)
2013-04-30 18:43 UTC, ecerichter
Details
No empty constructor offered - seems related too (27.16 KB, image/png)
2013-04-30 19:12 UTC, ecerichter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ecerichter 2013-04-30 18:24:21 UTC
Product Version = NetBeans IDE Dev (Build 201304272301)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_17
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.7-b01

I never saw a issue like this. I suspect the problem could even be a corrupt index, so I need guidance on how to gather information.
I'm working with Web Project, writing a Servlet.

When I asked for autocomplete, I got some kind of garbage. See attached screenshot for reference.
Comment 1 ecerichter 2013-04-30 18:24:28 UTC
Created attachment 133991 [details]
IDE log
Comment 2 ecerichter 2013-04-30 18:25:10 UTC
Correcting version to 7.4.
Comment 3 ecerichter 2013-04-30 18:25:14 UTC
Created attachment 133992 [details]
Screenshot of the issue
Comment 4 ecerichter 2013-04-30 18:26:38 UTC
Shift+Ctrl+I still works as expected.
Comment 5 ecerichter 2013-04-30 18:43:52 UTC
Created attachment 133993 [details]
Related issue with auto complete: local variable is not shown, only its methods
Comment 6 ecerichter 2013-04-30 19:12:23 UTC
Created attachment 133994 [details]
No empty constructor offered - seems related too
Comment 7 Dusan Balek 2013-05-03 14:11:23 UTC
It seems to be as designed behavior.

Looking at the first screenshot - it seems that you have enabled Subword Completion (in Tools->Options->Editor->Code Completion) a new feature of java editor (see issue #212412).

On the second screenshot another new feature of the java editor can be seen - Chained Completion (see issue #218604). Just scroll down the code completion list to the local variable.

The third example - default constructor is not offered by code completion perhaps because the inherited class has no default constructor to be called.
Comment 8 ecerichter 2013-05-03 15:30:53 UTC
(In reply to comment #7)
> It seems to be as designed behavior.
> 
> Looking at the first screenshot - it seems that you have enabled Subword
> Completion (in Tools->Options->Editor->Code Completion) a new feature of java
> editor (see issue #212412).

Yes. Thanks for pointing that.

> 
> On the second screenshot another new feature of the java editor can be seen -
> Chained Completion (see issue #218604). Just scroll down the code completion
> list to the local variable.

I understand. I would prefer to have variables first, and methods later. Would be more productive for my work style. Can we have a option to make variables appear first?

> 
> The third example - default constructor is not offered by code completion
> perhaps because the inherited class has no default constructor to be called.

Well this is a real issue: I expect that even the superclass has no default constructor, I can create one and call the super(...) with required parameters. I see no reason to not offer an option to create a default constructor even if superclass has none.
Comment 9 Dusan Balek 2013-05-16 11:56:18 UTC
Agreed - chained code completion items have been moved to 'all' completion and are available on second 'Ctrl+Space' - see issue #229560.

To provide default constructors in code completion a small API enhancement is necessary - see issue #229849.
Comment 10 Dusan Balek 2013-05-21 11:40:58 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/d5f0dbfae385
Comment 11 Quality Engineering 2013-05-22 02:37:39 UTC
Integrated into 'main-golden', will be available in build *201305212300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/d5f0dbfae385
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #229233 fixed. Default constructor creators are provided in code completion.