Bug 550862 - Irrational sorting in code auto completion due to Java Proposals (Tasked-Focused)
Summary: Irrational sorting in code auto completion due to Java Proposals (Tasked-Focu...
Status: CLOSED DUPLICATE of bug 506804
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Mylyn Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-07 11:40 EDT by Philipp Katz CLA
Modified: 2020-04-29 12:44 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Katz CLA 2019-09-07 11:40:39 EDT
In current Eclipse 4.12, the method auto suggestion behaves irrationally, and suggests entries with partial matches, despite there are perfect matches.

E.g.

1. Type `map.put`, `map` being `java.util.Map` 
2. First suggestions are `compute`, `computeIfAbsent`, `computeIfPresent`
3. Suggestion no. 4 is `put`
4. Following suggestions are `putAll`, `putIfAbsent`

See https://twitter.com/seleniumnodes/status/1166393111402209280

Expected:

I expect `put` being the first suggestion, followed by `putAll` and `putIfAbsent`. Partial matches (entered string just appears within the method should be sorted to the back).

I’m quite sure older versions did better -- I just recently updated from 4.7 to 4.12
Comment 1 Noopur Gupta CLA 2019-09-09 02:42:07 EDT
I don't see this in Eclipse 4.13 build I20190902-1800. Please try with a recently downloaded build in a new workspace.

Are you using Code Recommenders? If so, uninstall that and check again.

Also, reset all Java > Editor > Content Assist preferences to default and try.
Comment 2 Stephan Herrmann CLA 2019-09-09 12:39:58 EDT
I have one environment Eclipse IDE for Java Developers 2019-09 M2 (4.13.0M2) where consistently
  map.put
is wrongly expanded to
  map.compute

Looking into preferences I see
  Java Proposals (Tasked-Focused)

Disabling this and enabling instead
  Java Proposals

restores completion to sane behavior.

Thx, Noopur, for reminding me. Not code recommenders but Mylyn is the culprit this time. Do we have an open bug against them??
Comment 3 Noopur Gupta CLA 2019-09-10 07:43:57 EDT
(In reply to Stephan Herrmann from comment #2)
> Not code recommenders but Mylyn is the
> culprit this time. Do we have an open bug against them??
No, can you please report it to Mylyn?
Comment 4 Philipp Katz CLA 2019-09-11 04:23:48 EDT
Switching “Java Proposals (Tasked-Focused)” to “Java Proposals” did the trick for me. Many thanks!

I didn’t have time yet to try the new build, sorry.

More background and my 5 cents: This was a vanilla installation of Eclipse with a brand-new workspace and without any additional plugins. If the “Java Proposals (Tasked-Focused)” are the default, this might be off-putting for new users.
Comment 5 Noopur Gupta CLA 2019-09-11 04:37:04 EDT
Thanks for the confirmation. Moving this to Mylyn.
Comment 6 Stephan Herrmann CLA 2019-09-26 15:33:49 EDT

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