Any way to get IntelliJ-like autocompletion in Ecl

2019-01-30 08:33发布

问题:

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...

回答1:

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).



回答2:

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.



回答3:

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.



回答4:

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/



回答5:

ctrl-space or setting the delay to 0 does not solve the problem. the question is how to make Eclipse show auto-completion suggestions show up automatically as you type. it's a very convenient feature of IDEA, which I'd definitely love to have in Eclipse



回答6:

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