Archive for the ‘Tips & Tricks’ Category

30 Days with IntelliJ IDEA. User Interface

Wednesday, May 15th, 2013

We keep saying how IntelliJ IDEA is the most intelligent IDE. This is close to obvious for all who use it every day, but there are still a lot of people out there who aren’t aware of its exciting features which make development so much more productive. That’s why we decided to create a 30-day guide helping the new users (coming from other IDEs or just the beginners) to get a quick start with IntelliJ IDEA and learn how to use its top features for more efficiency.

The guide will include 30 articles featuring different aspects of the IDE, for each day of the trial period for IntelliJ IDEA Ultimate, our flagship IDE for polyglot development.

We are going to publish the new articles every few days on the official website. Each article will be accompanied with a post here with highlights on the trickiest features described in the article.

User interface for higher productivity

Today we will start with the user interface. (more…)

Use the UTF-8, Luke! File Encodings in IntelliJ IDEA

Monday, March 18th, 2013

Today we would like to answer the most frequent questions about file encodings in the IDE and show you a few tricks, which may help you to avoid potential pitfalls.

What is the problem with file encodings?

To be able to display the text correctly, IntelliJ IDEA needs to know which file encoding to use. Unfortunately, it is not always possible to tell the file encoding without additional information. Especially when single-byte encodings are used, there are multiple mappings possible.

(more…)

IntelliJ IDEA Productivity Tips. Part 1

Wednesday, October 31st, 2012

People unfamiliar with IntelliJ IDEA keep always asking me, why it’s better than other products. Today we have decided to make a short overview of some very basic features, that let developers be more productive every day.

In this episode we will show you some of the basic shortcuts for test-driven development. The video comes with transcription in subtitles. Check it out. See if you know and use all these basic features.


(more…)

Analyze Exceptions with Pleasure!

Wednesday, October 10th, 2012

Every developer in the Java world has to deal with exceptions. An exception stack trace is the easiest way to tell, what’s wrong in your program. In IntelliJ IDEA we try to make analysis of a stack trace more convenient for developers. As you might know, IntelliJ IDEA has Exception Analyzer, which helps you analyze a stack trace.

Today I would like to tell you briefly, how you can save your time dealing with stack traces.

The everyday story about exceptions:

  1. Receive an exception by e-mail, bug tracker or messenger
  2. Copy it to clipboard
  3. Switch to IntelliJ IDEA
  4. Go to Analyze → Analyze Stacktrace
  5. Press OK

Now you can easily skip 4th and 5th steps. Just check the option in Analyze dialog to analyze with pleasure.

Get Involved into IntelliJ IDEA Community!

Thursday, May 3rd, 2012

As you’re probably aware, lots of people use IntelliJ IDEA. Members of our community always have something to share. You can always share feedback, get answers to your questions or help other people with their problems.

We want to see our community well-connected and organized. So we’ve decided to remind you about the channels you can use to communicate with our team and each other to resolve any problems and share experiences. (more…)

Groovy support improvements in IntelliJ IDEA 11.1

Tuesday, April 3rd, 2012

Here I would like to tell you about some of the Groovy language support improvements available in IntelliJ IDEA 11.1.

Unused Symbol Highlighting

If a class, method or property is unused even if it is in fact public, you may notice it immediately with new unused symbol highlighting feature.

(more…)

Do you know where ‘Go To…’ can get you?

Thursday, January 19th, 2012

How often do you use ‘Go To Class/File/Symbol’ feature in IntelliJ IDEA? Pretty often I would guess. But do you know everything you can do with it? Let me go through a couple of often overlooked gems.

Do you know that when you search for file or class you can preview an image (Ctrl-Shift-I) or see a quick doc (Ctrl-Q)?

It is also possible to open multiple items in the editor (multiselect with Ctrl or Shift) or run multiple selected tests right from the search (Ctrl-Shift-F10).

And you can open all search results in the ‘Find’ tool-window to process them one by one later.

Did I mention your favorite feature? No? Please, share it with everyone! :)

Devoxx follow-up: your IDE can do more!

Wednesday, November 23rd, 2011

We’ve received lots of positive feedback at Devoxx 11 last week and met many happy users of IntelliJ IDEA. But to my surprise, many of them don’t know some little productivity features that have been there for quite a while. So, I want to just highlight a couple of them in this post.

Restore layout

You may sometimes find your IDE bloated with numerous tool-windows… but there is a simple way to get rid of them and rollback to pure editor. That is achieved by the following:
1. Configure tool windows in preferred way (e.g. all tool windows are closed);
2. Remember the layout - ‘Main menu | Window | Store Current Layout as Default’;
3. Call ‘Restore Default Layout’ action (mapped to ‘Shift+F12′ by default) when it’s necessary to rollback the UI;

Soft wraps

In essence, this is the ability to show all text even when it is wider than your editor’s viewport. Use-cases: laptops, diff views, split editor, console output etc:

IntelliJ IDEA support soft wraps starting from version 10 but the feature is significantly improved in the upcoming v.11.

Configuring soft wraps:

Soft wraps effect in Diffs view:

Debugger: working with sub-ranges for arrays and lists

Friday, September 30th, 2011

During debugging IntelliJ IDEA shows only the first 100 elements of arrays and collections. It’s enough in most cases. However, it’s sometimes convenient to use a custom range. Exactly for this the ‘Adjust Range’ action has been available for arrays for quite a long time. But recently we’ve made a couple of improvements to it. Namely:

  • ‘Adjust Range’ works with lists now
  • adjusted range is preserved for local variables delivered to another stack frame

Quick demonstration example:

  1. Start debugger and wait until target break point is hit;
  2. Right click on target array/list and select the ‘Adjust Range…’ action:
  3. Define a range:
  4. Check the result:

Refactoring in IntelliJ IDEA, Live by Robert C. Martin (Uncle Bob)

Monday, September 12th, 2011

It’s still over 3 months before the holiday season, but we just got a great present from our long time friend Robert C. Martin (Uncle Bob) — a live refactoring demo performed by the legendary software expert himself. He’s, of course, using IntelliJ IDEA!

Check out this video where Uncle Bob shows some refactoring techniques transforming a “large and ugly” function into a clean and readable piece of Java code, using such refactorings as Rename, Extract Method, Inline Variable, and others. We learn something new every time we watch experts like Uncle Bob.


You can also watch this video on JetBrains TV.

The video is part of the highly recommended “Clean Code” series of educational “code-casts.” More Clean Code videos are available at cleancoders.com.
Robert C. Martin (Uncle Bob) is the Master Craftsman at 8th Light Inc., 8thlight.com.

As a separate note, Robert C. Martin has recently released a new book “The Clean Coder: A Code of Conduct for Professional Programmers” which we think is a must read for every professional software developer.

Enjoy the demo and develop with pleasure!
-The JetBrains Team