Bug 565023

Summary: No content assist after Stream#map() function whose parameter is method reference
Product: [Eclipse Project] JDT Reporter: Gao Hao <1520080049>
Component: CoreAssignee: Vikas Chandra <Vikas.Chandra>
Status: NEW --- QA Contact: Vikas Chandra <Vikas.Chandra>
Severity: normal    
Priority: P3 CC: 1520080049, gayanper, jules.musy, mmariotti
Version: 4.16Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=563020
https://bugs.eclipse.org/bugs/show_bug.cgi?id=565536
Whiteboard: stalebug

Description Gao Hao CLA 2020-07-07 11:28:19 EDT
For the given code below, there is no content assist after map() function:

------------------------------------------------------------------------------

List<String> nameStrs = Arrays.asList("Monkey", "Lion", "Giraffe", "Lemur");

nameStrs.stream()
    .filter(s -> s.startsWith("L"))
    .map(String::toUpperCase)
    .sorted()
    .collect(Collectors.toList());

------------------------------------------------------------------------------

Now the character | indicates the cursor positon:

nameStrs.stream()
    .filter(s -> s.startsWith("L"))
    .map(String::toUpperCase)
    .s|orted()
    .c|ollect(Collectors.toList());

I invoked the content assist shortcut at the two position, but there is no Java proposals but some template proposals.
Comment 1 Vikas Chandra CLA 2020-07-08 02:29:12 EDT
I can recreate this behavior is latest I build as well as 4.16 Rc1 build.
Comment 2 Jules Musy CLA 2021-02-24 13:11:52 EST
The bug is still present on the latest official Release 2020-12 (4.18.0).

It's pretty annoying when working with Streams often and should be higher priority in my opinion.
Comment 3 Jules Musy CLA 2021-02-24 13:19:03 EST
(In reply to Jules Musy from comment #2)
> The bug is still present on the latest official Release 2020-12 (4.18.0).
> 
> It's pretty annoying when working with Streams often and should be higher
> priority in my opinion.

It is also present on flatMap.
Comment 4 Vikas Chandra CLA 2021-02-24 13:19:21 EST
Adding Gayan since he has worked on couple of similar issues.
Comment 5 Gayan Perera CLA 2021-02-24 17:10:04 EST
@Jules can you try on latest IBuild as well ?
Comment 6 Eclipse Genie CLA 2023-03-11 17:30:54 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.