The real power of code completion
Code completion is now a must for each and every IDE. But are you using all its power in IntelliJ IDEA? Check out the tricks below to get the answer.
Complete variables names
How often do you need to declare something like ArrayList list? Using Ctrl + Space you can complete the name of the variable. In this example, you will be suggested to choose between arrayList and list names.
Probably, you already used “CamelHump” for navigation and search. But it works for code completion too. Everything you typed in the editor will be replaced with the relevant code.
For example, you have the following expression:
And then you decided that this should be the minimum size. The fastest way to change this code in IntelliJ IDEA is to place the caret after the dot, then press Ctrl + Space. Find the setMinimumSize() method (don’t forget about “CamelHump”!), and press Tab.
The setPreferredSize() method will be replaced with the setMinimumSize(). Don’t worry about your parameters – they will stay where they are.
There are more tricks in IntelliJ IDEA related to completion (such as smart completion) that will be described in the future blog posts. But if you don’t want to wait, check out the Productivity Guide in IntelliJ IDEA or see description of java code assistance features.
Note This tip&trick was originally posted at www.javalobby.org.
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…