Bug 565023 - No content assist after Stream#map() function whose parameter is method reference
Summary: No content assist after Stream#map() function whose parameter is method refer...
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.16   Edit
Hardware: PC Windows 10
: P3 normal with 3 votes (vote)
Target Milestone: ---   Edit
Assignee: Vikas Chandra CLA
QA Contact: Vikas Chandra CLA
URL:
Whiteboard: stalebug
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2020-07-07 11:28 EDT by Gao Hao CLA
Modified: 2023-03-11 17:30 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.