Eclipse: Enable autocomplete / content assist

2020-01-30 02:56发布

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

7条回答
▲ chillily
2楼-- · 2020-01-30 03:05

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楼-- · 2020-01-30 03:07
  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.

查看更多
放我归山
4楼-- · 2020-01-30 03:20

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.

查看更多
一纸荒年 Trace。
5楼-- · 2020-01-30 03:21

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.

查看更多
够拽才男人
6楼-- · 2020-01-30 03:22

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.

查看更多
ら.Afraid
7楼-- · 2020-01-30 03:25

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.

查看更多
登录 后发表回答