2

When I am typing Ctrl-Space in Java file in Eclipse June, I am getting "no proposals". Meanwhile, if I do Edit->Content Assist->Java Proposals I have normal proposals list.

I.e. default proposals are not Java by some reason.

What it can be and how to setup?

Dims
  • 47,675
  • 117
  • 331
  • 600
  • are you in the correct perspective and using the correct editor? both should be Java. – logoff Oct 29 '12 at 14:31
  • It happens to me sometimes. I usually restart Eclipse in these cases. – Dan D. Oct 29 '12 at 14:31
  • Are there any compile errors in the code? Compile errors can confuse content assist. – Chris Gerken Oct 29 '12 at 14:34
  • There are a lot of errors, but not in current file. Usually it works well in such case. – Dims Oct 29 '12 at 14:41
  • maybe related: http://stackoverflow.com/questions/10706430/eclipse-content-assist-error http://stackoverflow.com/questions/908489/eclipse-java-code-completion-not-working http://stackoverflow.com/questions/2085749/intellisense-dissapeared-in-eclipse-how-to-get-it-back http://stackoverflow.com/questions/2390371/eclipse-autocomplete-not-working-in-some-java-files – Ray Tayek Oct 29 '12 at 14:41
  • I emphasize that while keystroke does not work, menu selection does. – Dims Oct 29 '12 at 16:38

1 Answers1

2

This happened to me at some point when I upgraded to Eclipse Kepler. Go to your Preferences. The appropriate page should be Java -> Editor -> Content Assist -> Advanced.

There are two lists of proposal types. Checking a type in the first list allows that proposal to appear automatically when it detects you pressing the trigger key. If it can't find any assist options in any of the checked proposal types, the Content Assist box will not appear.

Checking a type in the second list allows that proposal type to appear in the Content Assist box when it is already on screen, accessed by pressing the command to cycle the current proposal type. You can even change the order of appearance.

To solve your problem, at the very least, make sure Java Proposals checked in the first list (Technically, you can have it checked in only the second, but that means you'd need to manually bring up Content Assist and cycle to Java each time). Once checked, it should be automatically chosen as the default Content Assist for .java files.

AlbeyAmakiir
  • 2,217
  • 6
  • 25
  • 48