Core Java

My Favorite IntelliJ IDEA Features

I have been a long time user (and customer) of IntelliJ IDEA. I think I have started using it around 2005 or 2006, version 5.0 at the time. I was an Eclipse user back then. A few of my colleagues recommended it to me, and at first I was not convinced, but after trying it out I was impressed.

Now in 2014, IntelliJ IDEA is still my IDE of choice. The intent of this post is not to start an IDE war, but to focus on a few of IDEA features that sometimes other IDEA users are not aware of.
 
 
 

Darcula Theme

The Darcula Theme changes your user interface to a dark look and feel. Well, maybe this is nothing new for you, but I would like to point two major advantages. First, it causes much less stress to your eyes. Give it a try! After a few hours using the dark look if you switch to the default one again you’re probably going to feel your eyes burning for a few minutes. Second, if you’re a mobility addict and you’re always running on battery, the dark look can also help your battery to last longer.

intellij-darcula

Postfix completion

Postfix completion is the feature that I always wanted and I didn’t even know it. Postfix completion allows you to change already typed expressions. How many times all of us have cursed for having to return back to add a missing cast? Or because we actually wanted to System.out the expression? Well, Postfix completion fixes that.

For instance for the System.out, you type the expression:

someVar

You can now type:

someVar.sout

And the expression is transformed to:

System.out.println(someVar);

Check this awesome post in IntelliJ Blog for additional information about Postfix completion.

Frameworks and Technologies Support

In the Java world, you have a lot of frameworks and technologies available. Most likely you will come across to many of them in your developer work. Sometimes, it’s a nightmare to deal with the additional layer and the required configuration for everything to work correctly.

Look at Maven for instance, it’s a pain to find which dependency to import when you need a class. IDEA Maven support, allows you to search for the class in your local repository and add the correct dependency to your pom.xml file.

Just type the name of the class, press Alt + Enter and Add Maven Dependency:

intellij-maven-dependency-add

Pick the library you need. It’s added automatically to your pom.xml.

intellij-maven-dependency-added

You have support for Java EE, Spring, GWT, Maven and many others. Check here for a full list.

Inject Language

With Inject Language, it’s possible to have syntax, error highlighting and code completion for a large number of languages into String literals. I use GWT a lot, and this allows me to be able to write safe HTML into the String HTML parameters of the API, like this:

intellij-inject-language

Other examples include, SQL, CSS, Javascript, Groovy, Scala and many others. Try it out by yourself by pressing Alt + Enter on a String statement and then Inject Language.

Presentation Mode

Did you ever had the need to make a presentation about code using your IDE and the audience is not able to see it properly due to font size? And then you have to interrupt your presentation to adjust it. Sometimes you don’t even remember where to adjust it. Wouldn’t be easier to just have a dedicate presentation mode? Just go to View menu and then Enter Presentation Mode option.

Conclusion

I do believe that choosing an IDE is a matter of personal preference and you should stick with the one you feel more productive for the task that you have to complete. I still use Eclipse when I have to deal with BPM stuff.

Some of these features also exist on the other IDE’s, but I have the impression by chatting with other developers that they don’t know about their existence. Explore your development environment and I’m pretty sure you will learn something new. I’m always learning new stuff in IntelliJ IDEA.

Reference: My Favorite IntelliJ IDEA Features from our JCG partner Roberto Cortez at the Roberto Cortez Java Blog blog.

Roberto Cortez

My name is Roberto Cortez and I was born in Venezuela, but I have spent most of my life in Coimbra – Portugal, where I currently live. I am a professional Java Developer working in the software development industry, with more than 8 years of experience in business areas like Finance, Insurance and Government. I work with many Java based technologies like JavaEE, Spring, Hibernate, GWT, JBoss AS and Maven just to name a few, always relying on my favorite IDE: IntelliJ IDEA.Most recently, I became a Freelancer / Independent Contractor. My new position is making me travel around the world (an old dream) to customers, but also to attend Java conferences. The direct contact with the Java community made me want to become an active member in the community itself. For that reason, I have created the Coimbra Java User Group, started to contribute to Open Source on Github and launched my own blog (www.radcortez.com), so I can share some of the knowledge that I gained over the years.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

4 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Yuri Britto
Yuri Britto
9 years ago

Hi,

Congrats for your post. I started to use Intellij as my default IDE arround some months ago. And I can say that i don’t want to turn back to eclipse. This issues that you showed is just a few of the Intellij benefits.

I’m able to say that IntelliJ is so stable and fast.

Roberto Cortez
9 years ago
Reply to  Yuri Britto

Hi Yuri,

Thanks for your feedback! I might write a few things more about IntelliJ in the future.

Roberto

Veronica Slayer
6 years ago

Nice article

Thomas Melville
Thomas Melville
6 years ago

Thanks Roberto,

Great article! I did not know about postfix completion. I’ve been using Intellij for a few years now and I keep finding new features.
I find creating your own Live Templates great also.
The features trainer plugin is also great for learning short cut keys and new features.

Back to top button