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 252329 - method and property completion on implicit lambda parameter assumes the type to be Object until parenthesis are added
Summary: method and property completion on implicit lambda parameter assumes the type ...
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-10 12:29 UTC by mimfgg
Modified: 2015-05-11 08:48 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mimfgg 2015-05-10 12:29:03 UTC
Hi!

Since version 8.0.1, the code completion popup on lambda parameters seems to be "broken" in some cases. 

Assuming that *ctrl-space* is where the cursor is when I press ctrl-space and expect to see the code completion popup


The following code will produce the proper popup for the an object of Type Sample:

   List<Sample> samples = new ArrayList<>();
   samples.forEach((Sample sample) -> sample.*ctrl-space*);

The following will display only the methods of the Object class:

   List<Sample> samples = new ArrayList<>();
   samples.forEach(sample -> sample.*ctrl-space*);

Except if parenthesis are added after the '.' then it works :

   List<Sample> samples = new ArrayList<>();
   samples.forEach(sample -> sample.*ctrl-space*());

I couldn't find anything describing this behavior in the current bugs. Is that a known bug? This is pretty annoying to have to type ( and then go back one character to have proper code completion ... :D
Comment 1 Jiri Prox 2015-05-11 08:48:19 UTC
reproducible