Pergunta

The autocomplete of eclipse is not working now and I searched for hours but I couldn't find an answer to solve it. I haven't used it for long time then the first thing after opening it was to install SWT and windows builder even though I had swing installed. What I mean is, it is may possibly be because of some conflict caused by swt and swing(I read something about a conflict but I don't if this is possible).

Strange thing is it doesn't show anything when I press ctrl+space but when I go Edit-> Content Assist -> Default(it says Ctrl+Space nearby it), it shows things needed to be shown/works as desired.

public class Dsada {
    String sssss;
    public Dsada(){
        sss //pressing ctrl+space is not working,Edit->ContentAssist->Default works fine
    }
}

The solution is not to tick/untick some stuff under Windows->Preferences->...->Content Assist-> Advanced. I checked if "ctrl+space" is hijacked by some other thing which is not and checked keyboard language which is English(Those are suggested in mkyong).

I read something about a bug but I couldn't understand. I tried to delete eclipse and re-install again but I guess some settings just stayed in the machine so that it didn't work.

Thanks in advance,

Foi útil?

Solução 2

The hot key combination ctrl+space might be conflict with other settings in system if you are using windows.

Try modify this combination like alt+/, i always use this one since the first time i knew eclipse. It works well.

Hope it works for you.

Outras dicas

This is recurring for me. I'm using Eclipse 2019-03 in Windows 10. The steps below work for my case, and does not require a restart.

Window->Preferences->Java->Editor->Content Assist->Advanced

The following options are de-selected, and when I set them the autocomplete worked as before. No restart needed.

 1. Java Non-Type Proposals 
 2. Java Proposals 
 3. Java Type Proposals
 4. Java Proposals (Task-focused)

I don't know what's triggering this but it only happens after I've created a new project. Usually doesn't. It simply doesn't happen often enough for me to notice a pattern to follow up on more. Clearly this problem occurs with a variety of causes, so review the other answers to see if they match your case.

Window->Preferences->Java->Editor->Content Assist->Advanced

The following options have to be selected, then the autocomplete worked . No restart is required.

Java Proposals  (must be selected, not sure the follows)

Java Non-Type Proposals
Java Type Proposals
Java Proposals (Task-focused)

I was facing the same issue. If you use OS X Eclipse Ctrl+Space shortcut can be interfering with OS X system's "Selecting previous input source" using Ctrl+Space shortcut as default.

It is necessary to edit System Preferencies/Keyboard/Shortcuts/Input Source and uncheck the "Selecting previous input source" or change the shortcut on something else. Eclipse should work after that even without restart.

I faced hot key problem with use Ctrl+Space. I tried to fix the issue first by Windows->Preferences->...->Content Assist-> Advanced and selected Select the proposal kinds contained in the 'default' content assist list:

  • Other Java Proposals,
  • List item
  • SWT Template Proposals
  • Template Proposals
  • Type Proposals

but didn't help.

Therefore, I tried another solution. There would be multiple languages on your computer which could be eating up your Ctrl command. To solve this Go to Control Panel -> Region and Language -> Keyboards and Languages (tab) and then Change Keyboards.

You’ll see a list of languages installed – remove any that you don’t want (click the language and then click the Remove button) until you only have the ones you want left. That fixed it for me, but you can also check the Advanced Key Settings tab to make sure that none of the keyboard short-cuts that are set include Ctrl-Space.

Once you’ve done that, Ctrl-Space should work nicely!!!!

I had the same Problem on Ubuntu 14.04. The problem for me was that ibus used Ctrl+Space as a shortcut. I solved it by starting the program ibus-setup and chaning the shortcut to something else than Ctrl+Space.

Recently, I also faced this issue. When I install neon version eclipse. By (1) deleting respective class, (2) restoring defaults appearance and (3) restarting eclipse, solved the problem for me. Hope it will help someone.

Go to Windows >> Preferences » Java » Editor » Content Assist. Then Check the Auto activation triggers for java, Add this in the text box .abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ

Go to Preferences » Java » Editor » Content Assist » Advanced. Make sure Other Java Proposals is ticked/checked.

I checked windows has no conflict of ctrl+space (of eclipse autosuggestion) with windows.

This is mere configuration issue of eclipse. reinstallation would fix it.

Thanks.

I select all the parameters in Preferences -> Java -> Editor -> Content Assist -> Advanced. It help me and resolve the my problem. Cltr+space work using this step.

Saving my work and restarting Eclipse solved this for me. I hadn't shut down Eclipse in a while, maybe weeks.

I had the same problem (MacOS Monterey, Eclipse 06-2022). Turned out it works with pressed fn button.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top