Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse: Enable autocomplete / content assist

How can I enable autocomplete in Eclipse? I can't find it!

like image 876
john Avatar asked Aug 02 '11 12:08

john


People also ask

How is the Content Assist activated in Eclipse?

To enable the Content Assist window to open automatically, go to the Content Assist Preferences page, accessed from Window | Preferences | PHP | Editor | Content Assist and mark the 'Enable auto-activation' checkbox.

How do I Auto write in Eclipse?

Go to Preferences > Java > Editor > Content Assist and write . abcdefghijklmnopqrstuvwxyz in the Auto activation triggers for Java field. See this question for more details. They should make this the default behavior for eclipse.


7 Answers

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 menuPreferencesJavaEditorContent assist and check your settings here

like image 173
THelper Avatar answered Oct 04 '22 04:10

THelper


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:

  1. Eclipse > Preferences > Java > Editor > Content Assist
  2. Auto Activation > Auto activation triggers for Java
  3. 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.

like image 30
intcreator Avatar answered Oct 05 '22 04:10

intcreator


  1. window->preferences->java->Editor->Contest Assist
  2. Enter in Auto activation triggers for java:
    abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._
  3. Apply and Close

other method:
type initial letter then ctrl+spacebar for auto-complete options.

like image 44
deepak prajapati Avatar answered Oct 03 '22 04:10

deepak prajapati


For auto-completion triggers in Eclipse like IntelliJ, follow these steps,

  1. Go to the Eclipse Windows menu -> Preferences -> Java -> Editor -> Content assist and check your settings here
  2. Enter in Autocomplete activation string for java: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._@
  3. Apply and Close the Dialog box.

Thanks.

like image 33
Karthikeyan Karthikeyan Avatar answered Oct 02 '22 04:10

Karthikeyan Karthikeyan


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.

like image 32
FUD Avatar answered Oct 01 '22 04:10

FUD


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

like image 31
Prakash Bhandari Avatar answered Oct 01 '22 04:10

Prakash Bhandari


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.

like image 35
Petar Vujović Avatar answered Oct 02 '22 04:10

Petar Vujović