Code Completion: comparing Eclipse to IDEA 7.0.2

Hello,

I'm evaluating IDEA 7.x as a replacement for Eclipse Europa and was surprised at the behaviour of code completion which is mapped to the same keystroke in both IDE's. I am running both of them at the same time where the IDEA project has been set up to be linked with the Eclipse workspace. To prove that both are running on the same compiled code, I can successfully run all test suites with exactly the same results.

In Eclipse, ctrl-space and typing the first characters gives me the class suggestions that I expect, but IDEA just gives up with "no suggestions" even though I am sure this is a class in the project classpath and is compiled; a real surprise. Am I doing something wrong in IDEA?

See my attached screenshots.

- Mat



Attachment(s):
screenshot-eclipse-codecomplete-classname.png
screenshot-intellij-codecompletion-nosuggestion.png
4 comments

IntelliJ IDEA has different types of code completion for different purposes. To complete class names use CtrlAltSpace. You can look in the "Code > Complete Code" menu to see what other types of completion are available or see the help file.

Bas

0

Thanks! Got it.

To make things easier on the Eclipse cowboys, you can use the keymap settings in IDEA and switch the "basic" and "class" code completion keys (see screenshot).

- Mat



Attachment(s):
screenshot-intellij7-settings-keymap-classcodecompletion.png
0

You need basic completion to complete the names of classes, methods, fields and keywords within the visibility scope. Which means basic completion is most likely used more often that class name completion and switching the two types of completion may not be such a good option.
Also note that basic completion can complete class names too, they just have to be imported first. Class name completion inserts the import statement for you.

Bas

0

Please sign in to leave a comment.