Bug 488743 - [content assist] Alt+/ (Alt Slash) Word Completion doesn't cycle over possible completions on Linux
Summary: [content assist] Alt+/ (Alt Slash) Word Completion doesn't cycle over possibl...
Status: RESOLVED NOT_ECLIPSE
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.5.2   Edit
Hardware: PC Linux
: P5 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2016-03-01 04:11 EST by Piotr Findeisen CLA
Modified: 2017-12-11 14:41 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 Piotr Findeisen CLA 2016-03-01 04:11:30 EST
* steps to reproduce

1. Open a Java editor with the following content

public class C {
	// fear forest for f<cursor>
}

2. press Alt+/ (Word Completion) several times (holding Alt all time, or releasing and pressing it again -- doesn't matter).

* expected (and actually observed on Windows)

Word Completion offers "for", "forest", "fear" and then other proposals (based on other files, i guess), cycling when set of proposals is exhausted.

* observed on Linux

Word Completion offers "for", "forest" and nothing more, not even "fear" (same file proposal). Doesn't even cycle.

It looks as if Alt+/ Word Completion was losing the memory that it's being used in a continuous manner; i.e. every Alt+/ was a fresh completion. Effectively, the previous completion is a prefix for next completion, whereas the text actually written by a human should be the prefix for next completion.
Comment 1 Dani Megert CLA 2016-03-01 07:49:10 EST
Word completion is disabled by default. I suspect you have enabled in your Windows workspace but not on Linux. You can configure this via
Window > Preferences > Java > Editor > Content Assist > Advanced
Comment 2 Piotr Findeisen CLA 2016-03-01 09:07:47 EST
(In reply to Dani Megert from comment #1)
> Word completion is disabled by default. I suspect you have enabled in your
> Windows workspace but not on Linux. You can configure this via
> Window > Preferences > Java > Editor > Content Assist > Advanced

Hi Dani,

Thanks, but i think we talk about different things.

In '... Java > Editor > Content Assist > Advanced' i can enable "Word Proposals" and this indeed does change the proposals returned by Ctrl+Space ("Content Assist" command as far as "preferences > keys" are concerned).

And yes, I had this disabled -- in both workspaces (I use workspacemechanic to sync settings, btw.)

However, the bug concerns Alt+/ ("Word Completion" command) rather than "Content Assist".
Comment 3 Dani Megert CLA 2016-03-02 05:49:16 EST
(In reply to Piotr Findeisen from comment #2)
> (In reply to Dani Megert from comment #1)
> > Word completion is disabled by default. I suspect you have enabled in your
> > Windows workspace but not on Linux. You can configure this via
> > Window > Preferences > Java > Editor > Content Assist > Advanced
> 
> Hi Dani,
> 
> Thanks, but i think we talk about different things.
> 
> In '... Java > Editor > Content Assist > Advanced' i can enable "Word
> Proposals" and this indeed does change the proposals returned by Ctrl+Space
> ("Content Assist" command as far as "preferences > keys" are concerned).
> 
> And yes, I had this disabled -- in both workspaces (I use workspacemechanic
> to sync settings, btw.)
> 
> However, the bug concerns Alt+/ ("Word Completion" command) rather than
> "Content Assist".

Oops, sorry about that!

Alt+/ works fine for me on Windows and Linux using
http://download.eclipse.org/eclipse/downloads/drops4/S-4.6M5-201601282000/

Maybe the keybinding got lost, changed or overridden by another plug-in. Please check on the General > Keys preference page. There you can also try whether it works when you assign a different key binding.
Comment 4 Piotr Findeisen CLA 2016-03-03 07:03:05 EST
(In reply to Dani Megert from comment #3)
> 
> Alt+/ works fine for me on Windows and Linux using
> http://download.eclipse.org/eclipse/downloads/drops4/S-4.6M5-201601282000/
> 
> Maybe the keybinding got lost, changed or overridden by another plug-in.
> Please check on the General > Keys preference page. There you can also try
> whether it works when you assign a different key binding.

Thanks for the suggestion. I found out that:

* "Word Completion" is the only command bound to Alt+/
* when I assigned Ctrl+H, word completion started to work
* when I assigned Alt+H, is started to work erratically (as initially described).

So I guess it's a matter of Alt functioning differently.

Oh, and BTW, I'm using Unity (@ Ubuntu 15.10), although I have Unity's Alt binding ("show HUD") disabled.
Comment 5 Dani Megert CLA 2016-03-03 08:09:46 EST
(In reply to Piotr Findeisen from comment #4)
> Oh, and BTW, I'm using Unity (@ Ubuntu 15.10), although I have Unity's Alt
> binding ("show HUD") disabled.

Seems to be a Unity specific keybinding issue. I suggest to use an alternate keybinding for now.
Comment 6 Benji Shults CLA 2017-07-27 16:52:57 EDT
I'm seeing this on Ubuntu 16.0.4.  Exact same steps to reproduce.
Comment 7 Benji Shults CLA 2017-07-27 16:54:32 EDT
(In reply to Benji Shults from comment #6)
> I'm seeing this on Ubuntu 16.0.4.  Exact same steps to reproduce.

Eclipse 4.7.0.
Comment 8 Marcin Ka378mierczak CLA 2017-11-22 03:09:45 EST
Hi,

Temporal fix is to disable capturing an Alt key by Unity.
https://askubuntu.com/questions/151951/how-do-i-prevent-ubuntu-from-capturing-the-alt-key-to-show-the-hud
Comment 9 Leo Ufimtsev CLA 2017-11-22 09:30:07 EST
So I've used Eclipse for 4 years now and never knew we had Alt+/ to do 'instant word completion' of sorts. Kewl. Thanks for posting this.

This works fine on Fedora26/gtk3.22. As outlined in the ticket, it seems that the OS is hijacking the keybindings before they get to Eclipse.
Seeing that Ubuntu is moving to Gnome, it's likley not going to be a problem in the future anymore.

Should we close as not eclipse?
Comment 10 Dani Megert CLA 2017-11-22 09:32:27 EST
(In reply to Leo Ufimtsev from comment #9)
> Should we close as not eclipse?

+1.