Bug 541280 - Content assist proposals order is unreasonable
Summary: Content assist proposals order is unreasonable
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.9   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2018-11-18 05:21 EST by Bence Sipka CLA
Modified: 2019-04-24 06:02 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 Bence Sipka CLA 2018-11-18 05:21:10 EST
In Eclipse Proton

Version: 2018-09 (4.9.0)
Build id: 20180917-1800

the order of Java completion proposals is completely unreasonable and hinders workflow.

Given the following snippet:

NavigableMap<...> map;
map.ent

Invoking the content assist on the variable 'map' with a char sequence of 'ent' results in the following order of proposals:

ceilingEntry
computeIfAbsent
computeIfPresent
entrySet

Of course, I'm looking for the proposal entrySet, and it takes too many keystrokes to select that as it is only the fourth proposal.

My settings for the content assist is sorting by relevance (using alphabetically results in the same proposal order).
Camel case matches are enabled, substring matches are enabled.

I'd like to keep came case matches and substring matches enabled, as those are awesome features.

I believe that any proposal that starts with the currently invoked character sequence should be ordered first in the resulting list.

Using Eclipse Oxygen

Version: Oxygen.3a (4.7.3a)
Build id: M20180330-0640

The proposals are in the expected order as in:

entrySet
ceilingEntry
computeIfAbsent
computeIfPresent
Comment 1 Bence Sipka CLA 2018-11-18 09:47:41 EST
Sorry, I misspoke in my initial report.
When you invoke the content assist on the phrase 'map.ent', then the proposals are in the expected order. Same in Proton, as in Oxygen.

The bug appears, when you type 'map.', then open the content assist, and type 'ent' while it is still open. This way the visible proposals are not reordered to present 'entrySet' first, but in the unexpected order I descripbed previously.
Comment 2 Noopur Gupta CLA 2018-11-19 07:03:57 EST
I don't see this problem in Eclipse 4.9 plain SDK downloaded from http://download.eclipse.org/eclipse/downloads/drops4/R-4.9-201809060745/.

Please check if you can reproduce it with the build mentioned above. Make sure that no other plug-ins are installed.
Comment 3 Bence Sipka CLA 2018-11-20 03:05:24 EST
After downloading Eclipse from:

http://download.eclipse.org/eclipse/downloads/drops4/R-4.9-201809060745/

I've tested, and the bug doesn't appear.

Version: 2018-09 (4.9)
Build id: I20180906-0745

However, please note that as far as I can tell, this is an older build compared to the one I used, which has the build id 20180917-1800 (I assume the build id means the build date).

The one the I'm using is this one (where the bug is present):
https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/2018-09/R/eclipse-java-2018-09-win32-x86_64.zip

The Eclipse IDE for Java Developers on the downloads page.
https://www.eclipse.org/downloads/packages/
Comment 4 C Winkler CLA 2019-04-24 05:42:34 EDT
I see the same annoying behavior in 

Version: 2019-03 (4.11.0)
Build id: 20190314-1200
Comment 5 Dani Megert CLA 2019-04-24 06:02:52 EDT
(In reply to Bence Sipka from comment #3)
> The Eclipse IDE for Java Developers on the downloads page.
> https://www.eclipse.org/downloads/packages/
That package contains Mylyn which changes sorting. This might cause the problem.

You can try the latest SDK release:
https://download.eclipse.org/eclipse/downloads/drops4/R-4.11-201903070500/

or the latest milestone:
https://download.eclipse.org/eclipse/downloads/drops4/S-4.12M1-201904110625/

or try that latest Java package (which contains Mylyn):
https://www.eclipse.org/downloads/packages/release/2019-06/m1/eclipse-ide-java-developers