Java code completion in Eclipse IDE

北城以北 提交于 2019-12-11 09:59:08

问题


A few years ago i set up my first Eclipse IDE env at work to begin studying the language. As i remember, it was some Luna build and it had a specific and really addictive code completion, which understood skipping some letters... like "p l n" would find "println".

Now i'w installed Mars build(the Luna's one has gone with the past harddrive), and cant find this option. Some code completion works, but it looks only by the current character.

Could someone tell me where to look.


回答1:


Eclipse does understand skipping some letters in code complete, for example, if I have:

System.out.pln

with my cursor after the n and I press Ctrl+Space I am presented with all the println choices:

If it is not working for you I suspect that you don't have Code Recommenders installed or enabled. It should come by default with Eclipse IDE for Java Developers.

To check to see if it is installed and enabled, in Preferences, choose Java -> Editor -> Code Assist -> Advanced and see if Java Proposals (Code Recommenders) is listed and checked:

If it is not installed, install it from the Mars update site:

  1. From Help menu, choose Install New Software
  2. Choose Work With: as Mars - http://download.eclipse.org/releases/mars . from the drop-down list.
  3. Choose Code Recommenders for Java Developers from the list. You may need to uncheck Group items by category to find it.

  1. Complete the wizard, restart, check setting about and away you go.



回答2:


In Eclipse just press ctrl + space bar. to auto code completion



来源:https://stackoverflow.com/questions/34561696/java-code-completion-in-eclipse-ide

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!