简体   繁体   中英

Any way to get IntelliJ-like autocompletion in Eclipse?

I'm stuck with Eclipse in one project and I would like to have autocompletion similar to that of IntelliJ - two major problems are:

  • Start typing and Eclipse would automatically suggest all possibilities
  • When there is item selected in dropdown list you can accept it not only with enter key but with dots, spacebars...

Go to Window → Preferences → Java → Editor → Content Assist. In the column "Auto activation triggers for Java", enter this:

.qwertyuioplkjhgfdsazxcvbnm_QWERTYUIOPLKJHGFDSAZXCVBNM

Add any other keys you want. You're done. That answers your first query. As far as second one goes, I think it already exists.

Take a look at Eclipse Code Recommenders [1] or Codetrails Connect [2]. They make Eclipse' code completion intelligent.

[1] http://eclipse.org/recommenders/

[2] http://marketplace.eclipse.org/content/codetrails-connect-community-edition/

I have to say NO. I moved from Eclipse to IntelliJ because of the intellisense and inability to make Eclipse behave like IntelliJ (or if you come from the .NET environment: inability to make Eclipse intellisense behave like ReSharper in .NET).

Do you HAVE TO work in Eclipse? I do 98% of work in IntelliJ, then convert the project into Eclipse project (IntelliJ can still access it) and finish it in Eclipse. Maybe you could try this solution.

Since Eclipse Juno, Code Recommenders Intelligent Java Proposals replaced the old JDT's Java Proposals.

It afford "Intelligent Code Completion" function, like IntelliJ did in a way.

You can get something useful through the link below:

http://code-recommenders.blogspot.jp/2012/07/code-recommenders-10-code-completion-on.html

There is something like that in Eclipse I think, certainly in the Eclipse Helios. When typing you press CTRL+SPACE, or when you typed variable name '.' will start auto-complete options. Also here someone suggests to change auto complete delay settings to 0.

BTW you can also accept your selection with space bar, for sure.

EDIT: Why not consider using NetBeans, my personal favourite. There you have an option to show auto-completion on start typing any Java Identifier Part. This would then look exactly as you want it. (in NetBeans Tools->Options->Editor->Code Completion , there in Language box select Java and finally check Auto Popup on Typing Any Java Identifier Part).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM