问题
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:
- From Help menu, choose Install New Software
- Choose Work With: as Mars - http://download.eclipse.org/releases/mars . from the drop-down list.
- Choose Code Recommenders for Java Developers from the list. You may need to uncheck Group items by category to find it.
- 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