Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 389664 - [typing] Hippie completion only finds first match
Summary: [typing] Hippie completion only finds first match
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-15 10:59 EDT by Philip Aston CLA
Modified: 2012-09-20 13:56 EDT (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 Philip Aston CLA 2012-09-15 10:59:59 EDT
Hippie completion appears to be broken in Juno/4.2. It works fine for me in 3.7.

It completes the first match just fine, but subsequent completions are based on the match, not the original stem.

With a fresh install of eclipse-java-juno-SR1-RC2-linux-gtk-x86_64, I did the following:
- created a new workspace
- created a basic project
- created a text file

Added the following text to the file

abc
ac
ab
a

With the cursor positioned after the last "a", pressing Alt-/ repeatedly gives "ab", then "abc". Expected behaviour: "ab", then "ac".
Comment 1 Dani Megert CLA 2012-09-17 06:19:14 EDT
The steps work for me as expected using the steps from comment 0 and these builds:

3.8: http://download.eclipse.org/eclipse/downloads/drops/R-3.8-201206081200/
4.2: http://download.eclipse.org/eclipse/downloads/drops4/R-4.2-201206081400/
Comment 2 Philip Aston CLA 2012-09-17 08:00:06 EDT
Just tried again with http://download.eclipse.org/eclipse/downloads/drops4/R-4.2-201206081400/eclipse-SDK-4.2-linux-gtk-x86_64.tar.gz; same problem.

Maybe its platform specific?

I'm using Ubuntu 12.04.
Comment 3 Dani Megert CLA 2012-09-17 08:04:11 EDT
(In reply to comment #2)
> Just tried again with
> http://download.eclipse.org/eclipse/downloads/drops4/R-4.2-201206081400/
> eclipse-SDK-4.2-linux-gtk-x86_64.tar.gz; same problem.
> 
> Maybe its platform specific?
> 
> I'm using Ubuntu 12.04.

Could you please also test the 3.8 build for me?
Comment 4 Philip Aston CLA 2012-09-17 12:07:22 EDT
The 3.8 build exhibits the same behaviour. Contrary to my original report, so do 3.6, 3.7.

I've tracked down the cause. The Alt key in Ubuntu Unity is mapped to open the HUD ("Head Up Display") after a short pause. If I unbind this key in the compiz settings, hippie completion works as designed.

I don't know what the best way forward is here, perhaps documentation of the clash?
Comment 5 Philip Aston CLA 2012-09-17 13:50:06 EDT
On the other hand, the Alt-/ binding works just fine in Emacs, so perhaps this should be considered an eclipse bug?
Comment 6 Dani Megert CLA 2012-09-18 03:20:03 EDT

*** This bug has been marked as a duplicate of bug 340711 ***
Comment 7 Philip Aston CLA 2012-09-18 15:51:35 EDT
With respect, I'm un-duping this bug.

The contributing factor is the Ubuntu "Unity" interface. Unity was first introduced in Ubuntu 11.10. I think it is probably specific to the Unity HUD display, which came in in 12.04.

Bug 340711 is based on Ubuntu 10.04, and has different symptoms. (The user can't change the key mapping).

- Phil
Comment 8 Markus Keller CLA 2012-09-20 11:17:38 EDT
This works fine for me on Ubuntu 12.04. Pressing Alt+/ gives "ab", then "ac", then "abc", as expected.

If you just quickly press and release the Alt key, this indeed opens the Unity HUD, which in turn takes the focus away from the editor, and hence "commits" the completion. After that, completion starts on "ab", and the only remaining match is "abc".

If the Unity HUD bothers you, then just assign it to a different key.
Comment 9 Philip Aston CLA 2012-09-20 13:56:23 EDT
Thanks for your attention. It doesn't work for me (no, I'm not releasing Alt and waiting for the HUD to appear).

I'm sure I'm not the only one, but I'll have to wait for others to find this ticket and add their voice before I can convince you.

I have worked around the problem for now by unmapping the HUD key in the compiz config.