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 243463 - Incorrect code completion Java
Summary: Incorrect code completion Java
Status: RESOLVED DUPLICATE of bug 240570
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-01 22:28 UTC by iluvtr
Modified: 2015-03-18 12:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Image Bug 1 (117.47 KB, image/png)
2014-04-01 22:28 UTC, iluvtr
Details
Image Bug 2 (130.82 KB, image/png)
2014-04-01 22:29 UTC, iluvtr
Details
When it was OK, before BUG 1, NB 7.4 (76.03 KB, image/png)
2014-04-01 22:29 UTC, iluvtr
Details
When it was OK, before BUG 2, NB 7.4 (92.00 KB, image/png)
2014-04-01 22:30 UTC, iluvtr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description iluvtr 2014-04-01 22:28:40 UTC
Created attachment 146481 [details]
Image Bug 1

Code completion in Java editor of NB 8.0 is not accuratte as NB 7.x: Some examples:

Bug 1. When I'm trying to implement an interface or extend a class I get an strange 'public static void main' followed of the common extends and implements. 
Bug 2. When I autocomplete some classes I get some constants, not classes, just constants in first place of the list, for example ConcurrentHashMap brings me 'ResultSet.CONCUR_READ_ONLY', 'ResultSet.CONCUR_UPDATABLE' and other constants followed by the class ConcurrentHashMap
Comment 1 iluvtr 2014-04-01 22:29:01 UTC
Created attachment 146482 [details]
Image Bug 2
Comment 2 iluvtr 2014-04-01 22:29:51 UTC
Created attachment 146483 [details]
When it was OK, before BUG 1, NB 7.4
Comment 3 iluvtr 2014-04-01 22:30:06 UTC
Created attachment 146484 [details]
When it was OK, before BUG 2, NB 7.4
Comment 4 Jiri Prox 2014-04-02 07:10:11 UTC
The first bug is incorrect scope of 'psvm' template - go get rid of it, unselect 'CLASS' scope for this template
Comment 5 Dusan Balek 2014-04-04 08:15:54 UTC
Bug 1 fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/609886908248

As for Bug 2, please note, that code completion for static members works since NB 6.0. Spliterator.CONCURRENT and Characteristics.CONCURRENT shown on the attached image are new in JDK8.
Comment 6 iluvtr 2014-04-04 14:19:41 UTC
I don't think that completion of static members is a normal behaviour since versions 6.x as you can see in the image 3 . This behaviour wasn't present in NB versions 6.x. You can verify this: launch your IDE 6.x and compare with version 8.
This behaviour was introduced in 8. If the IDE will work since version 8 this way, please put an option to disable this 'feature'.
Comment 7 Quality Engineering 2014-04-08 06:09:33 UTC
Integrated into 'main-silver', will be available in build *201404080419* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/609886908248
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #243463: Incorrect code completion Java - fixed.
Comment 8 Dusan Balek 2015-03-18 12:32:26 UTC

*** This bug has been marked as a duplicate of bug 240570 ***