Bug 516006 - [content assist] Content assist gives the wrong first choice
Summary: [content assist] Content assist gives the wrong first choice
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.6   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2017-05-01 13:48 EDT by Sue H CLA
Modified: 2017-05-04 05:24 EDT (History)
4 users (show)

See Also:


Attachments
Installed Software Neon 4.6.3 (142.83 KB, image/png)
2017-05-01 14:38 EDT, Sue H CLA
no flags Details
Installed software plugin org.eclipse.jdt.* (118.57 KB, image/png)
2017-05-01 14:39 EDT, Sue H CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sue H CLA 2017-05-01 13:48:00 EDT
I type:

Thread.d<Ctrl>-Spacebar

The assist gives me these top choices:

currentThread Thread - Thread

dumpStack void - Thread


The first choice is much less relevant then the second choice.  Why would I type "d" if I wanted currentThread?

When working with any degree of speed, it is essential that the correct completions appear every time.  Complete must be predictable, sane, and reliable.  I'm using complete for speed, not because I don't know what I want.

This unpredictable complete will fill my code with bugs because it ALWAYS adds the wrong thing.  Since there seems to be no way to go back to a first letter only string search, I can't use context assist at all.  So I will have to go back to a previous version of Eclipse.

A this is a bad feature because the value of complete is lost.  It should show you as little as possible and help narrow down what you want.  Instead it shows as much as possible.

A better solution would be to have Ctrl-Spacebar give the old first-letter-only search, and Shift-Ctrl-Spacebar give the new, whole-string search.

This is very serious.  You have violated your relationship with your users with this version.  The same action results in entirely different software behaviour.  Its as if you made Right-Click mean delete the current file, or switched the drive and brake pedals in a new car.  The user upgrades and doesn't expect to have to relearn the interface - and break decade-long works habits.

Unless this is fixed or a workaround is provided, I won't use Neon again.  If you continue to abuse your users, I will stop using Eclipse entirely.
Comment 1 Andrey Loskutov CLA 2017-05-01 13:54:09 EDT
I can't reproduce the particular "d" problem in 4.7 head, "dumpThread" appears first. Probably fixed in 4.7, or even 4.6.3? Which Eclipse version are you using?

The feature itself can be switched off via Java->Editor->Content assist->Show substring matches.
Comment 2 Stephan Herrmann CLA 2017-05-01 13:56:48 EDT
I had just tried it in 4.6.2 and it was working as expected.
Comment 3 Sue H CLA 2017-05-01 13:58:16 EDT
I am using 4.6.3.
Comment 4 Stephan Herrmann CLA 2017-05-01 14:29:10 EDT
(In reply to Sue H from comment #3)
> I am using 4.6.3.

It works for me in 4.6.2 as well as 4.6.3.

Something must be different on your machine.

You may start by pasting the content of 
  Help > Installation Details > Installed Software
and perhaps from the Plug-ins Tab the exact versions of all org.eclipse.jdt.* plug-ins.
Comment 5 Sue H CLA 2017-05-01 14:38:58 EDT
Created attachment 268096 [details]
Installed Software Neon 4.6.3
Comment 6 Sue H CLA 2017-05-01 14:39:52 EDT
Created attachment 268097 [details]
Installed software plugin org.eclipse.jdt.*
Comment 7 Stephan Herrmann CLA 2017-05-01 18:20:32 EDT
Software versions look good.

To rule out any non-standard preferences you may want to try a fresh workspace and/or installation. Do you see the same proposal order in all these experiments?
Comment 8 Noopur Gupta CLA 2017-05-02 01:46:12 EDT
(In reply to Sue H from comment #5)
> Created attachment 268096 [details]
> Installed Software Neon 4.6.3
Comment 9 Noopur Gupta CLA 2017-05-02 02:18:23 EDT
I can see Code Recommenders is installed in your IDE. Could you please uninstall it and check if you can reproduce this issue?

You can also download the 4.6.3 build from here which doesn't have Code Recommenders:
http://download.eclipse.org/eclipse/downloads/drops4/R-4.6.3-201703010400/

Also, based on your example in comment #0, could it be that the target of the call is a Thread? In that case, the "currentThread" proposal is more relevant than the "dumpStack" proposal.
Comment 10 Sue H CLA 2017-05-03 15:08:36 EDT
It brings up currentThread with the "d" highlighted after I type the d.  If I then press Ctl-Spacebar it switches to dumpStack.

It does this in my workspace which was previously a Mars workspace.  I created a new workspace with the Neon installation, and I do not see this problem.

So starting with a fresh workspace created under Neon seems to be the workaround.

Uninstalling Code Recommenders for Java Developers did not fix the problem.
Comment 11 Sue H CLA 2017-05-03 15:41:53 EDT
When I hid .metadata/.plugins/org.eclipse.core.resources the problem went away.  I put the original back and the problem is still gone, so hiding this file must have caused another configuration file to refresh.
Comment 12 Sue H CLA 2017-05-03 15:45:28 EDT
Correction:  Hiding /.metadata/.plugins/org.eclipse.core.runtime temporarily solved the problem.
Comment 13 Dani Megert CLA 2017-05-04 05:24:09 EDT
There's not much we can do and since it works for you now, I'm closing this defect.