How can I enable autocomplete in Eclipse? I can't find it!
11 Answers
If you would like to use autocomplete all the time without having to worry about hitting Ctrl + Spacebar or your own keyboard shortcut, you can make the following adjustment in the Eclipse preferences to trigger autocomplete simply by typing several different characters:
- Eclipse > Preferences > Java > Editor > Content Assist
- Auto Activation > Auto activation triggers for Java
- Enter all the characters you want to trigger autocomplete, such as the following:
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._
Now any time that you type any of these characters, Eclipse will trigger autocomplete suggestions based on the context.

- 3,294
- 5
- 35
- 52

- 4,206
- 4
- 21
- 39
-
5This makes Eclipse's content assist behave more like IntelliJ's and Netbeans. Really helpful +1 – Pranav A. May 13 '18 at 22:33
-
13@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._ help for annotations – mohsen.nour May 21 '18 at 07:45
-
Isn't there an option for regular expression? like [a-zA-Z]? – wallop Aug 27 '18 at 03:53
-
1@wallop I kind of doubt it, but I have no idea. Tbh I copied this answer from a comment on the accepted answer and it blew out of proportion. I don't even use Eclipse anymore. – intcreator Aug 30 '18 at 17:34
-
1This is a more complete answer. Thanks. – Salil Junior Sep 06 '18 at 03:37
-
I tried the solution but isn't it a little bit annoying that you can't use keywords anymore without pressing ESC to avoid the content assistance? For example: if I type `else` I immediately get the assistance for `EditableWSDLService` which is overtaken immediately by pressing the space bar. So I cannot write with natural flow anymore. For that reason I went back to the default setting of content assistance. – the hand of NOD Feb 26 '20 at 10:23
-
7Also remember to check the box: "Disable insertion triggers except 'Enter'", otherwise, it will annoy you when typing – Tạ Anh Tú Sep 14 '20 at 05:17
By default in Eclipse you only have to press Ctrl + space for autocomplete. Then select the desired method and wait 500ms for the javadoc info to pop up. If this doesn't work go to the Eclipse Windows menu → Preferences → Java → Editor → Content assist and check your settings here
-
27
-
3@MikeG Go to 'Window Menu > Preferences > General > Keys'. If you then select 'Content assist' you can change the default key binding. – THelper Oct 15 '13 at 11:16
-
154Change the default in Auto activation triggers for Java to ._abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ http://stackoverflow.com/questions/1959946/ctrl-space-in-eclipse-without-pressing-ctrl-space – ftvs Nov 06 '13 at 03:52
-
2@ftvs Where is "default in Auto activation triggers for Java"? I couldn't find it. (Using 23). – kRiZ Dec 06 '14 at 09:43
-
Also, keep in mind that not all the classes have javadoc associated with them, so even with correctly configured environment, the help won't show up for such classes for obvious reasons. (I.e. if you don't see the dialog show up even after all the suggestions here, make sure there's javadoc indeed for the class/method you're trying to get assist for.) – Nikita R. Dec 28 '14 at 07:42
-
10@kRiZ, `Eclipse > Preferences > Java > Editor > Content Assist`. In the bottom pane "Auto Activation" there's the field "Auto activation triggers for Java". – Luís Ramalho Jan 27 '15 at 10:57
-
@ftvs I know there is a way of making the autocomplete use the first suggestion by default, so if you write `syso` you press `ctrl` + `space` and you get `System.out.println();` **without having to press enter**. However I cant remember how to set it so that `enter` is not necesary – J3STER Dec 27 '17 at 19:05
-
@J3STER I am pretty sure that this isn't possible at the moment without addons. – Pranav A. May 13 '18 at 22:34
-
when using spring you will have to install sts 3 from eclipse marketplace and then change perspective to spring and open xml config files using spring config editor for autocomplete to work. – U R Jan 30 '20 at 16:48
-
- window->preferences->java->Editor->Contest Assist
- Enter in Auto activation triggers for java:
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._ - Apply and Close
other method:
type initial letter then ctrl+spacebar for auto-complete options.

- 3,294
- 5
- 35
- 52

- 281
- 4
- 8
-
1Welcome to Stack Overflow! Please note you are answering a seven years old already answered question.Here is a guide on [How to Answer](http://stackoverflow.com/help/how-to-answer). – help-info.de Aug 22 '18 at 15:05
For auto-completion triggers in Eclipse like IntelliJ, follow these steps,
- Go to the Eclipse Windows menu -> Preferences -> Java -> Editor -> Content assist and check your settings here
- Enter in Autocomplete activation string for java:
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._@
- Apply and Close the Dialog box.
Thanks.

- 3,294
- 5
- 35
- 52

- 91
- 1
- 2
For anyone having this problem with newer versions of Eclipse, head over to Window
->Preferences
->Java
->Editor
->Content assist
->Advanced
and mark Java Proposals
and Chain Template Proposals
as active.

- 51
- 1
- 2
I am not sure if this has to be explicitly enabled anywhere..but for this to work in the first place you need to include the javadoc jar files with the related jars in your project. Then when you do a Cntrl+Space it shows autocomplete and javadocs.

- 5,114
- 7
- 39
- 61
If you are only unfamiliar with the auto-complete while typing syntax or inbuilt methods in the eclipse you can simply type the desired syntax or method name and press Ctrl+Space that will display the list of desired options and you can select one of them.
If the auto-complete option is not enabled then you have to check your settings from Windows menu -> Preferences -> Java -> Editor -> Content assist

- 3,294
- 5
- 35
- 52

- 549
- 8
- 16
If the auto-complete option is not enabled then you have to check your settings from Windows menu -> Preferences -> Java -> Editor -> Content assist->Advanced and mark Java Proposals and Chain Template Proposals .

- 11
- 4
In Eclipse click Windows Drop-Down > Click Preferences > Navigate to Java > Editor > Content Assist In order to Make the Auto suggestion/completion to work you have to set trigger that invoke the Auto Completion.
Now go to, Auto Activation > Auto activation triggers for Java
Enter all the characters you want to trigger autocomplete to be invoked in Eclipse IDE, such as the following:
Alpahabets: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
OR
Special Characters: ~!@#$%^&*()_+=-:;'"|?/.,
OR
Any combination of Alpahabets & Special Characters.
Now based on the references, Eclipse will trigger autocomplete suggestions for you.

- 109
- 1
- 3
For me, it helped after I changed the theme to 'mac' since I am running on a MacOSX.
Eclipse: >Preferences > General > Appearance > Choose 'Mac' from the menu.

- 3,294
- 5
- 35
- 52

- 13
- 1
-
4This is irrelevant to the Contest Assist, you are just changing the theme of the editor :) -1 – Pranav A. May 13 '18 at 22:32