Accepted answer

you can also set auto completion to open automatically while typing.

go to preferences > java > editor > content assist and write .abcdefghijklmnopqrstuvwxyz in the auto activation triggers for java field.

see this question for more details.



  • in eclipse, open the code auto completion box from first letter
  • go to >> window >> preference >> [ java c++ php ... ] >> editor >> auto activation triggers for...
  • add the character space by just putting your cursor inside and box and push the space key..

all the commands and variables which begin with that letter are now going to appear


pressing ctrl+space opens up the auto-completion dialog in eclipse. in the java perspective it opens automatically after you typed a . (normally with a short delay).


see if your settings are correct also:

window -> preferences -> java -> editor -> content assist. see if the "completion inserts" is checked off along with anything else there you want to help auto complete.


now in eclipse neon this feature is present. no need of any special settings or configuation .on ctrl+space the code suggestion is available


i had a similar issue when i switched from intellijidea to eclipse. it can be done in the following steps. go to window > preferences > java > editor > content assist and type ._abcdefghijklmnopqrstuvwxyzs in the auto activation triggers for java field


yes. if the suggestion doesn't compare automatically, then press crtl + space button.


its simple, these are the steps:

  1. first go to the following settings window -> preferences -> java -> editor -> content assist -> advanced
  2. there will be two boxes having checkboxes
  3. check everything in there and click apply
  4. now of course when you'll be coding there will be auto code completion feature automatically


since you asked about other java ide, i suggest intellij by jetbrains. just look at it: not only does it support auto completion as you type, but also it support import package once you select the auto completion.


before someone said "eclipse is free", note that intellij has free community edition as well:




window -> preferences -> java -> editor -> content assist > enter


in the auto activation triggers.

it will allow you to complete your code.


go to windows--> preference--->java--->content assist--->enable auto activation---(insert ._@abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz in auto activation triggers for java)

eclipse preferences


use the ctrl+space shortcut for getting all possible autocomplete options available in a particular context in the editor.

auto complete will also allow you to insert custom code templates into the editor, with placeholders for various inputs. for instance, attempting to auto complete the word "test" in a java editor, in the context of a class body, will allow you to create a unit test that uses junit; you'll have to code the body of the method though. some code templates like the former, come out of the box.

configuration options of interest

  • auto-activation delay. if the list of auto complete options is taking too long to appear, the delay can be reduced from windows -> preferences -> java -> editor -> content assist -> auto activation delay (specify the reduced delay here).
  • auto activation trigger for java. accessible in the same pane, this happens to be the . character by default. when you have just keyed in typea. and you expect to see relevant members that can be accessed, the auto completion list will automatically popup with the appropriate members, on this trigger.
  • proposal types. if you do not want to see proposals of a particular variety, you can disable them from windows -> preferences -> java -> editor -> content assist -> advanced. i typically switch off proposals of most kinds except java and template proposals. hitting ctrl+space multiple times will cycle you through proposals of various kinds.
  • template proposals. these are different from your run of the mill proposals. you could add your code templates in here; it can be accessed from windows -> preferences -> java -> editor -> templates. configuration of existing templates is allowed and so is addition of new ones. reserve usage however for the tedious typing tasks that do not have a template yet.

Related Query

More Query from same tag