Smart Type Completion Becomes Even Smarter
Most of you are aware of IntelliJ IDEA smart type completion feature that is invoked with Ctrl+Shift+Space shortcut. If you are not familiar with this feature, I totally recommend you to read the post about it, because this thing is a real developer’s gem. Besides, in the latest IntelliJ IDEA 8 Milestone 1 release, this gem became even shinier.
Long story short, let’s cut to the chase and inquire into the matter through the examples.
- Consider we have the following code:
If we press Ctrl+Shift+Space and get no results, because a collection type is expected, we can press Ctrl+Shift+Space again to make IntelliJ IDEA search for arrays with the same component type and suggest to convert them with Arrays.asList() call. - Press Ctrl+Shift+Space twice, and IntelliJ IDEA will search for chained expressions of the expected type.
- When an array type is expected, but no suggestions can be made in the current context, press Ctrl+Shift+Space one more time. IntelliJ IDEA will search for collections with the same component type and suggest to convert them with toArray() call.
Comments below can no longer be edited.
James Victor Henry III says:
August 20, 2008Fantastic! You are always ahead of competition wrt to suchlike features.
James Victor Henry III says:
August 20, 2008By the way, the default key bindings for IDEA are not OSX/Leopard-friendly. They clash with Spotlight, Spaces, Spotlight, etc. You should review the whole key bindings and have a separate configuration for them on OSX.
dmitryx says:
August 21, 2008please-please-please add drag’n’drop for editor tabs, or shortcuts to move them, like ctrl+alt+right, ctrl+alt+left.