Software Development

5 Features Eclipse Should Copy From IntelliJ IDEA

Eclipse Photon has been released a few days ago, and I decided to do yet another comparison with IntelliJ IDEA. Last time I explained why I still prefer Eclipse, but because my current project had problems with Java 9 in Eclipse initially, I’ve been using IntelliJ IDEA in the past half a year. (Still using Eclipse for everything else; partly because of the lack of “multiple projects in one workspace” in IDEA).

This time, though, the comparison will be the other way around – what IDEA features I’d really like to have in Eclipse; features that make work much easier and way more efficient. (Btw, what’s the proper short version to use – IntelliJ? IDEA?)

Isn’t that a departure from my stance “Eclipse is better”? No – I don’t believe there’s a perfect IDE (or perfect anything, for that matter), so any product can try to get the best aspects of the competition. Here I’ll focus on five features of IDEA where Eclipse lags behind.

First, the “Find in path” dialog. The interactivity of the dialog, the fact that you see all the results while typing and being able to navigate the results with the arrows is huge. Compare that to Eclipse’s clunky Search dialog, which (while pretty powerful), has a million tabs (rarely focused on the one you need) and then you actually click “Search” to get a list of results in a search panel, where you double-click in order to see the context…it’s just bad compared to IDEA.

Second is suggesting static imports. Static imports are not used too often, except in tests. Mockito, Hamcrest, test utility methods – in every class you need dozens of static imports. And Eclipse feels miserable with those – you manually go and import the methods you need, then organize imports and suddenly you need another one, and the .* you naively added has been changed to particular imports, so once again, you have to go and manually import. In contrast, IDEA just suggest the most relevant static import in the autocomplete pop-up and handles that for you.

Third is autocomplete. IDEA autocomplete triggers automatically when you start typing; in Eclipse it only triggers after a dot – otherwise you have to CTRL+space. And yes, I know there’s auto-activation setting where you can configure symbols that trigger the auto-complete, but as I’ve previously complained about IDEA’s defaults, it’s Eclipse’s turn. And it’s not even a checkbox – you have to actively type the entire alphabet, lower and upper case, in order to get it working – that’s just bad design. In what scenario would I need autocomplete on a,b,c but not on d,e,f??

Fourth is lambda simplification. You sometimes end up with pretty long chain of calls on a stream and they may not be the best way to express what you want. IDEA can suggest improvements so that it is more readable and easier to understand while achieving the same result. As a bonus, you eventually start doing this simplifications yourself.

Fifth – parameter labels. When you call a method foo.bar("Some string", 0, true) it’s not exactly obvious what the parameters are. And while you can rightly argue that this is a bad method signature, primitive (+String) parameters where you just pass a value happen every now and then, and it’s useful to see the name of the parameter at the point of method invocation. IDEA nicely shows that.

There are certainly more things that each of the IDEs can copy from the other one. Hopefully this competition will continue and result in improving both.

Published on Java Code Geeks with permission by Bozhidar Bozhanov, partner at our JCG program. See the original article here: 5 Features Eclipse Should Copy From IntelliJ IDEA

Opinions expressed by Java Code Geeks contributors are their own.

Bozhidar Bozhanov

Senior Java developer, one of the top stackoverflow users, fluent with Java and Java technology stacks - Spring, JPA, JavaEE, as well as Android, Scala and any framework you throw at him. creator of Computoser - an algorithmic music composer. Worked on telecom projects, e-government and large-scale online recruitment and navigation platforms.
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
5 years ago

also class decompilier, eclipse is lacking a good one from Java8

Serhio
Serhio
5 years ago

1) Quick Text Search (Ctrl+Shift+L) is it similar?

Patrick Fav
Patrick Fav
5 years ago

IntelliJ does support multiple modules (from different folder) in a single “workspace” https://stackoverflow.com/a/33777371/774398

Karsten Thoms
Karsten Thoms
5 years ago

Nice read! It is very helpful to know the things that users need in Eclipse IDE. Please file these as enhancement requests to https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform Please be as specific as possible how you would imagine the features in Eclipse, maybe attach screenshots. The Eclipse Platform team is interested in such features. Ideally get them contributed ;) Some remarks: Static imports can be added in the preferences in Java/Editor/Content Assist/Favorites. There select the classes for which you want automatic imports for static members. Maybe it makes sense to have an option to always propose static imports without the need for explicitly listing… Read more »

Back to top button