77

For some reason auto complete no longer works. for example when writing code using the android bitmap class, when i use the dot operator eclipse would suggest methods for that object instance. how do you turn this feature back on?

thanks mat.

turtleboy
  • 8,210
  • 27
  • 100
  • 199
  • I'm not exactly sure but choosing from menu Eclipse/Preferences.. And continuing to Java/Editor/Content Assist in opening dialog could be what you're looking for. – harism May 06 '11 at 19:32
  • @harism hi everything seems ok there. auto activation triggers for java is set to the dot operator – turtleboy May 06 '11 at 19:44
  • In that case, if "Restore Defaults" doesn't fix your problem either, I'm very much clueless how to continue. – harism May 06 '11 at 19:52
  • does ctrl+space bring up autocomplete? – jkhouw1 May 06 '11 at 20:40
  • @jkhouw1 no, that is the feature I'd like – turtleboy May 07 '11 at 00:37
  • I've had this problem too. I've noticed that if I "Close Project" and "Open Project" again, I get exactly one autocomplete which shows android.* classes. Further autocompletes omit them. – sehugg May 20 '11 at 22:53
  • Actually updating to the latest ADK seems to have solved it for now. – sehugg May 20 '11 at 23:00

6 Answers6

260

I had this same problem. Here is how I solved it.

In Eclipse go to

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

And check the boxes labeled "Java Proposals" and hit Apply.

starball
  • 20,030
  • 7
  • 43
  • 238
dChimento
  • 2,861
  • 1
  • 17
  • 10
  • 9
    Works here too. I'd like to know why/how it got turned off! – Tustin2121 Dec 22 '11 at 21:23
  • I don't have Java in my preferences. This has only occurred since I did an update. Do you have any idea how to change this or whether it has moved in the update? Thanks! – edwoollard Sep 24 '12 at 07:50
  • 3
    It didnt work for me. The "Java proposals" is already checked. I tried unchecking, apply, then check them again, apply. Nothing. Restarted several times, nothing =( – Ted Feb 26 '13 at 13:19
  • The Android tools for Eclipse helpfully turned this option off for me. It showed me a warning, once, which I ignored, thinking it would come back later, but it didn't. – qris Oct 15 '13 at 10:15
  • On Eclipse Luna on Mac OS X the "Preferences..." is under the "Eclipse" menu item. – gardarh Aug 27 '14 at 14:38
  • Thank you indeed. But I really wonder why on earth it has been disabled in the first place. Android development on Eclipse is a pain in the neck, better switch to Android Studio right away. – koders Sep 21 '14 at 16:44
28

Im my case was API tools proposals the option that cause my autocomplete doesn´t work, here are the 4 default options that must be checked...

  • API Tools Proposals.

  • Java Proposals.

  • SWT Template Proposals.

  • Template Proposals.

    default configuration

the next time i must be careful when click Ctrl+Space =D

Community
  • 1
  • 1
Jorgesys
  • 124,308
  • 23
  • 334
  • 268
17

Go to Preferences > Java > Editor > Content Assist and paste "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz." (note the dot after z) into the "Auto activation triggers for Java:" field. This worked for me ! Now as i type I get autocomplete options

user1909533
  • 181
  • 1
  • 2
10

Here's another solution I dicovered:

I would check the other solutions listed here first and if all else fails shut down eclipse then delete the file 'org.eclipse.jdt.ui.prefs' found in the workspace directory (Workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings).

Seems in my case the workspace became corrupted somehow and this fixed it. Haven't yet noticed any adverse effects by doing this.

Rooster242
  • 911
  • 3
  • 10
  • 19
  • 1
    I've noticed that sometimes Eclipse will simply refuse to perform auto-complete within a certain context. I assume the context resolution fails for some reason, and none of the resolutions mentioned here seem to resolve this aside from some code restructuring. You may want to check if this is happening with you as well by checking auto-complete on some other Java file in your project. – Paul Lammertsma Oct 22 '13 at 15:14
2

eclipse use "ctrl+[space]" to show the "css/html/java proposal"

0

I had the same problem and none of the solutions here worked. For some reason, my Scheme had changed from "default" to "Emacs". So to fix it, I had to go:

Preferences> General> Keys and change the scheme back to default.

Rosa
  • 84
  • 7