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.
Subscribe to Blog updates
Thanks, we've got you!
Profile on the Fly With the IntelliJ Profiler
At JetBrains, we believe that profiling should be simple and accessible to all developers, regardless of their level of expertise. That’s why the IntelliJ Profiler puts ease of use and seamless integration at the forefront of its mission. In previous releases, we introduced a range of features to s…
History of Gradle Delegation Process in IntelliJ IDEA
Nowadays, a build tool is an essential part of any project, and IntelliJ IDEA integrates with the majority of them. Among the most popular build tools is Gradle. We’d like to give a brief historical overview of its integration with IntelliJ IDEA and the delegation process implemented inside the I…
How to Work With Protobuf-Maven Projects in IntelliJ IDEA
Protobuf, short for Protocol Buffers, is a language-agnostic data serialization format developed by Google. It is designed to efficiently and reliably serialize structured data to communicate between different systems and programming languages. Protobuf offers a compact binary representation of data…
Turbocharge Lombok annotations with IntelliJ IDEA
If you’re a professional Java developer, you probably use IntelliJ IDEA as your IDE and Lombok as the framework that handles the Java boilerplate. What you probably didn’t know is that not only do these 2 technologies work well on their own, but when combined, they’re even more efficient than when u…