Accepted answer

try restoring the default options in 'windows > preferences > java > editor > content assist > advanced'

an example of the kind of data you see in this preference screen, however not necessarily what you currently have.

eclipse content assist setting

(from vadim in this blog post " content assist duplicates in eclipse (mylyn)":
if have duplicate mylyn entries, uncheck the duplicate entries that do not contain "(mylyn)" in their name)

the eclipse help page defines the default list to restore:

select the proposal kinds contained in the 'default' content assist list:

  • other java proposals,
  • swt template proposals,
  • template proposals,
  • type proposals


for me in sep 2021 it was an odd eclipse bug. i had a multi-line string inside an annotation in my class. this caused just that particular class to fail when trying to code complete (even though the class compiled just fine).


for me the issue was a conflict between several versions of the same library. the eclipse assist was using an older version than maven.

i had to go to the .m2 directory and delete the unwanted lib version + restart eclipse.


i experience problems on eclipse neon when editing a file which does not belong to the project directory. when i copy the same file to the project root directory, not even to the src directory, the completion starts working.

when the file is opened from a different directory, only completion for jre works. that is for example: java. completes, but junit. does not.


just in case anyone got to a desperate point where nothing works... it happened to us that the content assist somehow shrunk so no suggestion was shown, just the "press ctrl+space for non-java..." could be seen. so, it was just a matter of dragging the corner of the content assist to enlarge the pop-up.

i know, embarrassing. hope it helps.

note: this was an ubuntu server with xfce4 using eclipse oxygen.


if you're experiencing this in an enum, or when initializing an array with anonymous classes, it's a known bug in eclipse. see eclipse content assist not working in enum constant parameter list.


we can change the settings as per our requirement.

suppose we want to make java proposal as highest priority we need to do changes as shown below.

windows > preferences > java > editor > content assist > advanced

choose java proposal and click on up button

enter image description here


in my case, intellisense had only disappeared in a few classes in one project. it turned out this was because of a missing library on the build path (although it worked previously).

so definitely check all the errors or problems in eclipse and try to find if a library may be missing


i ran into this and it ended up being i was opening the file with the text editor and not the java editor.


for those who use the latest 3-19 eclipse build:

it just happened to me when upgrading from oxygen to 3-19 eclipse version, so i assume the auto-complete feature does not migrated correctly during the upgrade process.

the only solution that worked for me was to create a new eclipse workspace, and import the project/s to it. it might take a few minutes, but it worth it - comparing to the time spent on other solutions...


maybe this helps other people who come across the same issue.

my setup: old gradle project (version gradle 2.12) made by someone else, imported using the gradle import wizard into sts (eclipse oxygen.2 (4.7.2)).

code completion did not work either (and i still have hollow js at the java files), but at least i got the code completion to work by doing:

  • right click on the project folder > properties > gradle > configure workspace settings > java > editor > content assist > advanced
  • check "java proposals in upper window.
  • 2x apply & close


i have run into this problem since upgrading to eclipse 2019-09. based on some of the suggestions above, this is what worked for me.

i had to go to eclipse -> preferences -> java -> editor -> content assist -> advanced.

java editor/content assist advanced

i found out that if i turn on any of the key binding proposals, java non-type, java, java (task-focused) or java type proposal, then i was able to use auto complete. if i turned them all on, then not only did auto complete work, but i got duplicate methods listed. i am guessing, but i will probably used java type proposals. any clarification of what differs for these four types would be appreciated.


running sts on java spring boot projects, here's what works for me :

enter image description here


i faced this problem, and spent hours trying to figure out the issue. tried to follow the steps mentioned in the different answers above, the solution i found is on the same lines as mona suggested, but slightly different. tried to add as a comment to mona's answer but no option was available. issue with my eclipse was, classpath somehow got corrupted and all the jars and dependent projects were missing. after taking the latest .classpath from repository it worked fine.


check that you did not filter out many options inside the window > preferences > java > appearance > type filters

items in this list will not be appear in quick fix, be autocompleted, or appear in other various places like the open type dialog.


i also face this issue but it is resolved in different way. steps that i follow may be helpful for others.

  1. right click on project (the one you are working on)
  2. go to properties > java build path > jre system library
  3. click edit... on the right
  4. choose the jre 7


once you have you configuration checked and completion is still not working:

  • make sure you have the right directory structure.

do you see the right icon beside the file?:

enter image description here

it will tell you how the file will be treated by eclipse:

enter image description here

i am posting this answer as i had that story with with maven webapp artifact. by default maven-webapp does not create folder for sources and i put my java into resources, wondering for 5 minutes what was going on... :)


if you have installed google toolbar for ie, may be you can face the same problem. because, the toolbar capture the shortcut ctrl+space.


i had this problem and like @marc, only on a particular class. i discovered that i needed to designate open with = java editor. as a eclipse newbie i hadn't even realized that i was just using a plain text editor.

in the package explorer, right-click the file and chose "open with".


none of these worked for me.

i was experiencing this issue in only once particular class. what finally worked for me was to delete the offending class and recreate it. problem solved... mystery not so much!


another solution which worked for me is to go to java--> appearence --> type filters and do disable allenter image description here


check the lib of your project. it may be that you have include two such jar files in which same class is available or say one class in code can be refrenced in two jar files. in such case also eclipse stops assisting code as it is totally confused.

better way to check this is go to the file where assist is not working and comment all imports there, than add imports one by one and check at each import if code-assist is working or can easily find the class with duplicate refrences.


for those running xfce + having ibus plugin activated, there might be keyboard shortcut conflict.

see more info on my blog:


as suggested by @nhahtdh's comment, adding the some more info to answer directly: ibus plugin in xfce uses by default ctrl+space shortcut for keyboard layout switching. to change it, go to: options and change it to whatever else you prefer.


in case someone comes here and want to activate the autocomplete function, go to

preferences -> java -> editor -> content assist.

then in the auto activation section fill in auto activation triggers for java:


enter image description here


i'm adding an answer here in case someone else finds this on google. same symptoms; different problem. for me, the type caches had become corrupt.


  • quit eclipse
  • go to workspace/.metadata/.plugins/org.eclipse.jdt.core
  • remove *.index and savedindexnames.txt
  • restart eclipse and search ctrl+t for the offending type. the indexes will be rebuilt.

Related Query

More Query from same tag