Intellij Idea versus Eclipse – part I

6 min read >

Intellij Idea versus Eclipse – part I

Engineering Insights & Enterprise solutions

>> 10 reasons why Idea is better

In this part, I’m focusing on the advantages of Idea over Eclipse. I plan for a 2nd part to check out the other side – advantages when using Eclipse over Idea.

This is not a major feature comparison, but more of a mix of small experiences intended to ease your life as a developer. I’ve spent a lot of time developing server-side applications with both IDEs, so I can’t really speak for differences when it comes to J2ME support or other features. I’ve also had my share of experiences with quite a few Eclipse plugins, but I haven’t tried them all (who did?).

I have to mention I’m talking here about Idea 5.x vs Eclipse 3.1. I played only a bit with Idea 6.0 and barely tried Eclipse 3.2.

1. Navigation – The idea is king when it comes to navigating through hierarchies in Java classes. The ability to go to implementation it’s fun and easy to use. Eclipse may have some plugins that do this, but still not as smooth as Idea.

2. Intentions – when adding methods to your interfaces, Idea automatically suggests you implement that method in all implementing classes. With Eclipse’s default configuration you can’t do that. Not even sure there are plugins offering this feature. This tremendous feature really improves productivity when you build APIs and continually add methods to your interfaces.

3. One package to rule them all – a lot of functionality packed into one single installer: Idea has almost everything you want to be packed in one single package. The fact that for Eclipse you have to customize your own distribution is a pain in the a**. There are MyEclipse (not free) which may take Eclipse very close to Idea, or EasyEclipse, which is a distribution packed with almost everything you want.

4. Keyboard shortcuts for ant tasks – Idea allows you to assign keyboard shortcuts for ant tasks which increases productivity. For typical web applications, I usually have two shortcuts: one for deploying web resources and one for compiling and deploying java classes. Eclipse didn’t pay too much attention to this feature. I know you can assign one shortcut (don’t ask me how – somebody showed me once and it was so complicated I didn’t bother remembering how to do it). And overall, changing keyboard shortcuts in Eclipse is somehow more painful than in Idea. I guess this happens because Idea presents that tree (Settings/Keymap) containing Main Menu and Ant tasks amongst others. Eclipse has two tabs: View & Modify. View shows a long list and Modify shows two combo boxes. Guess the tree control is more suitable here.

5. Exclude folders – Idea has made it so simple to specify which resources you want to exclude from your project: typical build, dist directories. This is useful for many situations. I’ll just name two:

a) you don’t want to see Idea’s “Updating modified files” loading bar every time you do build or dist your project

b) when opening resources such as XML files, you don’t wanna see two or three XML files with the same name and have to carefully choose which one you edit. In Eclipse it would’ve been so much simpler if they would have used the same Idea of excluded directories. I think I managed to do this once, to avoid the problem from point b), but now I can’t even remember how to do it.

6. Autosave – Idea autosaves each file. Don’t bother manually saving, confirming, or discarding file changes. At first, I haven’t appreciated it much the Idea. I thought: what happens if I don’t want to save what I modified? If all the text editors and IDEs out there need CTRL+S, why change it? I even found myself pressing CTRL+S out of habit. However, in time I got to appreciate this feature since 1. it doesn’t bother you with all kinds of popups asking whether to save your file or not before running the ant task and 2. it turns out I don’t usually need the option of not saving what has been modified. While it’s not a major feature, it does ease your life and save you from more unwanted mouse clicks.

7. Pinning/unpinning tools windows – Unpinning project window, console window, ant console window, or ant window in Idea is a great feature. I usually unpin all my windows and have this way all the screens for editing my java files. And since I customized my keyboard shortcuts, I can easily bring up the project window on the left side (I use ALT+~), ant window on the right side (I use ALT+), and any of the lower windows (debug, run, and console, etc – Idea’s defaults are ALT+0,1,2…). UPDATE: This can be actually configured also in Eclipse by using fast views on utility windows along with shortcuts for displaying/hiding them. When displaying them, they do however show up over the editor and are always on the left side. Almost close to how Idea handles it.

8. Find usages vs References in the workspace – Idea finds your usages, automatically selects the first usage, nothing wrong. Eclipse can look for references in the workspace, and find them, but sometimes forgets to select the first usage. If you have a hierarchy of 5-7 packages, then you’ll understand how painful is to have to open each package to get to the first occurrence. I admit with the latest versions, Eclipse does its job well almost every time: searches and focuses automatically on the first reference, but I have no idea why sometimes (rarely) it just doesn’t do it. It’s so frustrating when it happens.

9. Refactoring in non-java resources – when I first discovered you can refactor names in an ant build file I was blown away by how natural this feature seemed. AFAIK in Eclipse, you can’t do it (perhaps you know how to do it).

10. Export/import preferences – Idea saves every option you may customize – I still haven’t found some customization that Idea did not save. As for Eclipse, it has a nice Import/Export preferences feature, but somehow they forgot to save code templates. Since I’m used to templates like “sout” (automatically transformed to “System.out.println” by Idea), I usually customize Eclipse by adding a new template, which unfortunately doesn’t get saved when exporting your preferences. I like “sout” better than “sysout” since it’s … shorter.

Part 2 will contain 10 reasons for Eclipse.

Unlock innovation and digital transformation for your business.

Get in touch

We are always happy to talk

Phone

+40-21-223-7700

Email

hello@tremend.com

Address

165 Splaiul Unirii, Timpuri Noi Square,
TN Office 2 building, 4th floor,
District 3, Bucharest, Romania, 030134