What Makes IntelliJ IDEA Different
What Makes IntelliJ IDEA Different
Join the DZone community and get the full member experience.Join For Free
Get the Edge with a Professional Java IDE. 30-day free trial.
This post may sound commonplace to you if you already use IntelliJ IDEA. If so, then just ignore it or share with a friend of yours, as it’s intended for people who are still wondering what’s so special about IntelliJ IDEA and why is it so different from other IDEs.
I’m not going to compare them feature-by-feature (which I personally find silly), but instead will focus on more conceptual aspects. In case you’re using Eclipse or NetBeans, please do not take any offence, as none is intended. This is a fundamental rule that everybody is free to choose what tools to like. But still, let me show you the difference.
I think you’ll agree with me that all modern IDEs give you more or less similar feature set: code completion, refactorings, and navigation. And this is crucial to understand that what IntelliJ IDEA is trying to do ‒ is to enable them all to work together smoothly, offering you the productivity boost that it is so famous for.
Let’s start from the user interface, a major factor that determines how productive you can be when using it. This is why IntelliJ IDEA UI was built following these major principles:
- No distractions
- No task switching
- No mouse
Pause for a moment and think about what part of an IDE you think is most important. Well, editor is what obviously first comes to your mind. It’s the editor where you spend most of your time writing code.] IntelliJ IDEA editor is special in a number of ways, most notably that you can invoke almost any IDE feature without leaving it, which allows for layout where you have more screen space because auxiliary controls like toolbars and windows are are hidden.
Then, you have dedicated keyboard shortcuts for nearly everything, including rapid selection and switching between tool windows and the editor. For example, Alt+1 (Cmd+1) takes you to the Project structure, and Alt+4 to the Run console.
Accessing a tool window via its shortcut moves the input focus to it, so you can use all keyboard commands in its context. When you need to go back to the editor, just hit Esc. See? You can get around without even touching mouse.
IntelliJ IDEA has no perspectives like other IDEs do (e.g. Eclipse). It means that you don’t need to switch between different workspace layouts manually to do different tasks. The IDE follows your context and brings up the corresponding tools automatically. Since there are no perspectives, the shortcuts and actions stay the same all the time.
Creating new classes and files
When you’re in the Project tool window, you can not only navigate through the items but create new ones as well.
This is yet another thing about IntelliJ IDEA: you don’t have to walk through wizards or fill huge forms to get things done. Most of the operations are as easy as writing code, so you can focus on your work and let the IDE do the rest. And there’s almost always more than one way to do what is needed, for example, there are at least two more ways to create a class.
Another useful shortcut is the Recent files that shows you a list of files you’ve worked on recently, with the latest one on top.
Despite its simple appearance, this is a real time saver. You’d be surprised how much time this little feature can save you when working on projects with large number of files.
All lists and trees in IntelliJ IDEA provide you with the Speed Search that quickly takes you to a set of items that contain text you’re typing in them.
Let’s talk about more general ways to navigate through project files, like the Navigate to class, and Navigate to file actions.
This is the quickest way to navigate to a particular class. You can use camel humps to type even less. Don’t bother typing class name from from its beginning, IntelliJ IDEA will recognize partial names as well. Use dots to specify packages, and asterisks for wildcard matching. Icing on the cake is that you can add a particular line to which you want to jump: just type it after semicolon.
Almost the same set of capabilities work for the Navigate to file action.
Because IntelliJ IDEA has an index of everything in your project, it’s absolutely not a problem to navigate to any member of any class by an expression, e.g. field, constant or method.
Code completion in IntelliJ IDEA is not just a simple feature that inserts plain lines of code, but a rich, smart tool that includes type and data-flow aware completion; chain calls and static members, statement, and many (i mean really many) other sorts of completion. If you haven’t done it yet, go ahead and read about them here and there.
Everything said above is also true about refactorings, yet another feature available today in every modern IDE. In fact it’s not about the number of refactorings your IDE gives you, but rather about how confident you feel using them.
The first and perhaps the most impressive aspect of refactorings in IntelliJ IDEA is its all-encompassing support for languages and frameworks. It not only recognizes many languages, expressions and dialects (even nested inside each other), but also their relationships within the project. Please make sure you’ve read this article on the top 20 refactoring features in IntelliJ IDEA.
If you’re not familiar with IntelliJ IDEA, the concept of quick popups may sound odd to you. However, this is one of the most useful things in this IDE. They are helpful for checking additional information without leaving the context that you’re in.
The thing I find exciting about an IDE that it lets you navigate over the code via the mouse, like it is hypertext (holding Alt). Honestly, it took me a while to figure out that there has always been a much better way, which implies to use quick popups instead of a mouse.
When you press Ctrl+Q it shows you the documentation for the symbol at caret. Press Esc to close it. Alternatively you can see the definition by pressing Shift+Cmd+I (sometimes it’s more useful than the documentation).
Or if you want to see the hierarchy for a symbol just press Alt+Cmd+U and you’ll see it on a diagram.
You didn’t expect a complete IntelliJ IDEA coverage in a single article, did you? Users would keep discovering completely new and exciting features even after many years of heavily using IntelliJ IDEA. And that’s great.
Opinions expressed by DZone contributors are their own.