61

I have heard from people who swear by one or the other. Both are full-featured, excellent IDEs. But each has slightly different strengths. This is not meant to turn into a holy IDE war. Please downvote any flamebait answers. Thanks.

This is the analog of this question.

Community
  • 1
  • 1
Craig P. Motlin
  • 26,452
  • 17
  • 99
  • 126
  • 3
    Mmmm..., getting IntelliJ for free for "individual developers" ? ;) – VonC Jan 20 '09 at 13:40
  • :) It's an important difference. – Craig P. Motlin Jan 20 '09 at 15:53
  • And now you can have at least Community Edition for free (and it's open source) - http://www.jetbrains.com/idea/free_java_ide.html – IgorK Feb 03 '10 at 16:08
  • 2
    @IgorK Please try to do enterprise developments with the Community Edition (hint, you can't). – Pascal Thivent Sep 06 '10 at 23:46
  • @Pascal Thivent I don't use Community Edition for my day job ;) Still some people may find it useful. – IgorK Sep 08 '10 at 08:12
  • 1
    @Pascal Thivent My experience is IntelliJ Community Edition is equivalent to Eclipse without purchasing plugins like MyEclipse. Eclipse by default didn't seem to handle JSP and other Java EE technologies beyond very rudimentary stuff. – Colin K Dec 19 '10 at 19:46
  • 24
    The symmetric question about [features of IntelliJ not available in Eclipse](http://stackoverflow.com/questions/239732/things-possible-in-intellij-that-arent-possible-in-eclipse) is still open. Please reopen this one also. – Francois G Jul 05 '13 at 12:45
  • Ah, the "format purist" question closing fascists strike again and close yet another interesting discussion down. "Not constructive" yet it has 45 up votes. Ah well. – Manius Jan 15 '15 at 03:05
  • I am very new to IntelliJ, and so far a very useful feature in Eclipse missing in Intellij: in Eclipse you can have all the projects in your workspace lined up on the left panel and you can open/close them as you wish to compare codes, etc, you can have as many projects open as you wish, where in IntelliJ, you must first close a project and then open the other, there is no way to open two projects at the same time, which if you need to compare and grab code from one to the other, could be very time consuming and frustrating. – blueSky Nov 10 '22 at 01:26

16 Answers16

37

My favourite small annoyance in IDEA (and favourite small feature in Eclipse) is the positioning of the character when typing an opening curly brace (e.g. "{") or a semicolon. You'll have to enable it in Eclipse (Window/Preferences/Java/Editor/Typing: "Automatically insert at correct position: Semicolon, Braces")

With this just type ahead ("|" is the caret position)

while(|

results (no magic yet) in

while(|)

now type true{, results in

while(true) {|

So simple, yet so powerful.

Also, in (e.g.)

System.out.println("Hello world")

with the caret anywhere in that line, typing a semicolon will automagically type it at the end of the line. Backspace corrects, just like the usual autocorrection in your favourite wordprocessor.

Priceless. I'm physically no longer able to type a semicolon at the correct position on first try :)

Lii
  • 11,553
  • 8
  • 64
  • 88
Olaf Kock
  • 46,930
  • 8
  • 59
  • 90
  • 14
    You want to try CTRL-SHIFT-ENTER in IDEA. It will "complete" the line in both cases – oxbow_lakes Feb 15 '09 at 18:33
  • 5
    Thanks, that was news for me - though I can't get my grip around all those key combinations idea uses. ';' and '{' are *so* much more intuitive. I'll be working in idea next week and will try to remember... ;-) – Olaf Kock Feb 20 '09 at 18:19
  • 1
    What if you want to insert ; in the string? – fastcodejava Sep 08 '10 at 06:34
  • 5
    If you want to insert ; in the string just press backspace, as in OpenOffice, Word or others. This will revert the autocorrection. The vast majority of my semicolons (by several orders of magnitude) end a line, so I'm extremely happy with it. – Olaf Kock Sep 08 '10 at 07:52
  • In some ways, Eclipse has more key combinations in this case :) IntelliJ uses crtl+shift+enter for all "Complete Statement" operations (like both the examples above), whereas Eclipse uses different keys in each example. Which is easier? I guess it depends... in the above examples the Eclipse shortcuts *are* obvious, so I agree they're more intuitive. However, IntelliJ uses the same shortcut regardless - so even if it isn't obvious there is only one shortcut to know. – Colin K Dec 19 '10 at 20:19
  • 3
    @ckeh: In Eclipse it isn't a shortcut, but the character you want to type. Just the position gets corrected. – Tim Büthe May 20 '11 at 09:01
  • I gave up android studio after few days' trial for this feature... Am I too lazy? – jiashie Sep 01 '14 at 03:28
30

Eclipse's incremental compiler lets you run unit tests even while there are compiler errors in unrelated code. IntelliJ relies on javac which doesn't emit bytecode unless all the code is valid.

Craig P. Motlin
  • 26,452
  • 17
  • 99
  • 126
  • 9
    IntelliJ has provided the option of using Eclipse compiler or AJC since quite a while. (Settings > Compiler > Java Compiler > Use Compiler dropdown) – ddimitrov Apr 02 '13 at 01:40
  • 2
    Does it mean even Idea folks know Eclipse is better in *compiling*? – Piotr Findeisen Feb 03 '14 at 00:24
  • Wow, I was so missing this feature in IDEA, but here it is. And they are not even ashamed to name it "Eclipse compiler", hats off :) – Kranach Feb 16 '15 at 21:23
24

I tried to switch to IntelliJ because of the new Android Studio. But I'm very disappointed now. I'm using Eclipse with the Code Recommenders Plugin. Here is a simple example why Eclipse is so awesome:

I want to create a new SimpleTimeZone. SimpleTimeZone has no Constructor with zero arguments.

Ctrl + Space in Eclipse

enter image description here

Ctrl + Space in IntelliJ

enter image description here

In IntelliJ I get no informations what kind of constructors SimpleTimeZone has.

After Enter in Eclipse

enter image description here

I get the previously selected constructor filled with predefined variable names. And I can see the type of every argument. With Code Recommenders Eclipse guesses the right constructor by the previously defined variable types in the current scope and fills the constructor with these vars.

After Enter in IntelliJ nothing happens. I get an empty constructor. I have to press Ctrl + P to see the expected arguments.

enter image description here

or try something simple. Type

syso<Ctrl+Space>

Eclipse: System.out.println()

IntelliJ: syso

reevesy
  • 3,452
  • 1
  • 26
  • 23
passsy
  • 5,162
  • 4
  • 39
  • 65
17

As far as I know there is no alternative to Eclipse's excellent Mylyn task plugin in IntelliJ.

Lii
  • 11,553
  • 8
  • 64
  • 88
SamBeran
  • 1,944
  • 2
  • 17
  • 24
  • 1
    There is task management in IntelliJ 9 and up: http://blogs.jetbrains.com/idea/2009/05/task-context-management-in-maia/ But it may not be exactly the same as Mylyn... which may be bad... or good :) Depending on what you need. – Colin K Dec 19 '10 at 20:37
  • 9
    The new task management is really good. This answer is not valid anymore :) – SamBeran Dec 21 '10 at 19:39
  • 1
    @SamBeran I'm afraid the answer is still valid. Using both Eclipse and IntelliJ IDEA regularly I can say that Task management in IntelliJ IDEA is nowhere near Mylyn, unfortunately. – user1338062 Mar 13 '13 at 10:01
  • @SamBeran Please correct me on this. However it seems that IJ's entire concept of task context is just which tabs to have open. It doesn't seem to filter the files shown in the project sidebar, or have any of the other context filtering which makes Mylyn useful. I do hope I'm wrong, because I want to use IJ for other reasons. – Gerry May 11 '14 at 04:45
  • I don't use it the tasks in IDEA, just looked into them and appeared to be as good as Mylyn. I retract my previous statement and would accept the other commenters information over mine. – SamBeran May 12 '14 at 03:25
13

Since Eclipse 3.3 (but it can be done before using a plugin), you can automatically execute actions while saving a Java file:

  • organize imports
  • format source code
  • some other actions (like adding annotations, removing unnecessary casts...)

This can be configured in Preferences > Java > Editor > Save actions.

Romain Linsolas
  • 79,475
  • 49
  • 202
  • 273
  • 3
    IntelliJ can be set to optimize imports on the fly, add unambiguous imports on the fly. On save formatting is different - in IntelliJ it is "On Commit": see http://stackoverflow.com/questions/3707316/save-actions-in-intellij-idea – Colin K Dec 19 '10 at 20:03
7

The open nature of Eclipse platform makes thrive the plugin writers community. There are tons of plugins available for all kind of tasks.

Peter Severin
  • 2,455
  • 21
  • 13
  • 4
    The question was about things possible in Eclipse not possible in IDEA. Do you mean writing plugins is not possible for IDEA? – Pavel Feldman Jan 22 '09 at 21:30
  • I mean there are many more plugins for Eclipse than for IDEA. – Peter Severin Jan 23 '09 at 08:39
  • 2
    I do count number of plugins as direct benefit. Some functionality, available in Eclipse as plugins (like better JS support) is embedded in IDEA. – Pavel Feldman Jan 25 '09 at 23:59
  • It would probably be useful to check out the if there is a feature in one of the IDEs that you need that isn't in the other - whether plugin or not. Without specific examples, quantity may mean there are several duplicates, rather than actual tasks missing. Also, as Pavel notes some features are embedded in IntelliJ (as "bundled" plugins) so there is no need to get the plugin separately. I suspect the same is true of Ecplise. http://plugins.intellij.net/ – Colin K Dec 19 '10 at 20:09
6

My favorite Eclipse features:

  • AspectJ integration that includes navigation between aspects and the code, annotation markers showing where aspects are applied, cross reference view, common open typed dialog showing aspect types (recently added)
  • OSGi tooling (aka PDE), editing and optimizing OSGI manifest, refactorings specific to OSGi and declarative services editor (currently in the works)
5

I can't figure out how to automatically add javadoc in Intellij, whereas in Eclipse it's just: Shift-Alt-j

Things I don't like about IntelliJ (from an Eclipse developer)

  • Tab key doesn't indent to correct spot with just one tab press.

  • The multi project is the first one...but many people have covered that before so I'll leave it.

  • The splitting of windows. In Eclipse you simply drag the window wherever you want it and it goes there.

  • The font sucks. I changed to the next best one i could find: Liberation Mono, size 14. (Setting>Editor>Colors&Font>Font)

  • Highlighting for XML is nasty...removed the bolds.

  • Syncing the editor window with the file selected in the project navigator. I can't make this happen by default, I have to press the button each time??? Found it:

  • Double clicking in project navigator sometimes doesn't open the file. Sometimes even tripple clicking won't do it. Only a quadruple click opens it up! ** Here is an answer...it's just that the double click speed is too freakin fast: In regards to the double clicking in IDEA the reason why it’s hard to open files by double clicking is that Java programs e.g. IDEA reads the double click speed from X11 resources. If it is not explicitly set then it defaults to 200 ms which is lightning fast. In order to have a more sane threshold create ~/.Xresources and add: *.multiClickSpeed: 400

  • Can't figure out how to get the suggestion: "Assign statement to local variable" that Ctrl-1 gives in eclipse. I use that all the time.

** Yep! This is the Introduce Variable refactoring. By default, select some text, and then hit Ctrl + Alt + V. If the expression is incomplete or invalid, IntelliJ will still make a good guess about what you meant and try to fix it for you.

  • Tab doesn't take line to correct spot right away.

  • Couldn't get it to auto complete properly ** Ctrl-Shift-Space helps...

  • Hot code re-run. In eclipse I can modify a method while in the debugger, and it reloads the frame. ** Right-click: drop-frame

  • Double clicking a variable to highlight it, doesn't highlight other occurrences of the variable.

  • Deprecated methods are not crossed out.

  • Can search properly in Settings menu. All it filters out is top level names as opposed to all strings inside menus themselves. Can't find where to set my jdk!

  • Doesn't compile on the fly, only when I hit 'debug' does it compile.

  • No 'right-click on class and choose New > JUnit' function.

  • When debugging, window comes up at bottom and can't move to where I'd like it. ** Drag the small icon when it's collapsed to whichever side you want it to pop out from.

Things I do like:

  • Paste history is nice:

Ctrl-Shift-V

  • Simply clicking the debug/run icons actually runs the last configuration, eclipse isn't that smart with it ( or it's too smart??? ), and I don't like the way it does it.

  • Autocomplete is very good.

  • Only click once to add a break-point

  • Code collapsing/expanding seems nicer.

  • Ctrl-Shift-- (minus) collapse/fold all.

  • “Column mode” can be turned on it “Edit - Column mode” or with alt + shift + insert

ftravers
  • 3,809
  • 3
  • 37
  • 38
4

Only eclipse allows you to step through an ant build in the debugger.

Craig P. Motlin
  • 26,452
  • 17
  • 99
  • 126
4

Idea has no drools plugin and external editors (like excel) are hard to integrate.

Arne Burmeister
  • 20,046
  • 8
  • 53
  • 94
4

In eclipse you can maximize the editor and in IntelliJ you can click escape, which is similar functionality. But in eclipse you can restore. There's no equivalent "un-maximize" in IntelliJ which is even more frustrating.

Craig P. Motlin
  • 26,452
  • 17
  • 99
  • 126
  • The same shortcut used to maximize the editor can also be used to "un-maximize" the editor afterwards. – Ruben Jan 22 '09 at 08:39
  • 2
    This is incorrect. crtl+shift+F12 toggles between maximized editor and whatever the previous state was (as I believe Ruben is stating, but to be more precise with shortcuts). – Colin K Dec 19 '10 at 19:33
  • Menu: Window -> Hide All _W_indows (or Restore _W_indows) depending on which state you're in. – Colin K Dec 19 '10 at 19:37
  • I should note: I'm referring to IntelliJ menus and shortcuts. ;) – Colin K Dec 19 '10 at 19:38
  • 1
    I was referring to double clicking the tab. However it looks like this is implemented in IntelliJ 10. – Craig P. Motlin Dec 20 '10 at 15:01
2

The biggest annoyance I've found (using both) is that in Eclipse I can create Ant Launch tasks. These tasks allow me to run the same ant task in the same build file using different sets of properties/arguments without editing each time.

In IDEA, properties are set across the entire build file. So not only can you not run the same ant task with different properties without editing, but you can't run different ant tasks with different properties unless they are in different build files.

Instantsoup
  • 14,825
  • 5
  • 34
  • 41
  • 3
    You can add the same Ant build file multiple times to IntelliJ's "Ant Build" window and set different Properties (alt+enter) for these different instances of the same file. For example, I created a simple ant build file with a target that just echoes out a property, then set the property to "Hi" in one instance and "Hello" in the other. Running the same "greeting" target gives different results depending on which instance is run. Would this cover the scenario you've mentioned? – Colin K Dec 19 '10 at 20:56
  • It might! I'm no longer at a place that provides IDEA, so I'm using Eclipse by default, but I'll keep that in mind, thanks! – Instantsoup Jan 07 '11 at 18:40
2

I've summed up my comparison of Eclipse 3.6 and IntelliJ 10.5 in a blog (focused more on what I like in II or miss there compared to Eclipse)

Jakub Holý
  • 6,019
  • 3
  • 33
  • 33
  • 1
    Nice summary. I've now been using IntelliJ for about 3 years and I would never go back to Eclipse. I think your concerns about performance are easily addressed by a slight adjustment to your workflow. In Eclipse, you must be clicking ctrl+S frequently to save your files and force compilation. In IntelliJ you never need to save files, but you do need to force compilation. Just replace your habit of clicking ctrl+S with ctrl+f9, which makes the project. You'll find that the workflow and speed is nearly equivalent, and IntelliJ might be a little faster. – Craig P. Motlin Oct 26 '11 at 18:21
  • 4
    SO is not for links shares, you should ave quote some points. – Paul Verest Apr 22 '14 at 02:01
1

Overall I had good working experience in both IDEs so both have many good features. In IDEA 9_0_3 I am facing a strange problem working with SVN. I can see the history of changes in repository view but it shows nothing as incoming changes which is frustrating. The alternate is to update the directories which bring latest but without any choice.. it get all

Adnan
  • 11
  • 1
0

A working subversion integration, have a look at the bugs of the idea subversion plugin.

Arne Burmeister
  • 20,046
  • 8
  • 53
  • 94
  • A whopping 2 issues more than http://subclipse.tigris.org/issues/buglist.cgi?issue_status=UNCONFIRMED&issue_status=NEW&issue_status=STARTED&issue_status=REOPENED – krosenvold Jan 20 '09 at 13:34
  • Subversion integration appears to work pretty well for me in IntelliJ 7.0.5. No issues that I've seen. – duffymo Jan 20 '09 at 13:44
  • Subversion integration also works well for me in 7.0.x and 8.x. Working with a very large CVS repository on the other hand was a problem for me in the 7.x. – Ruben Jan 20 '09 at 13:49
  • 2
    I work with eclipse, idea 7 and idea 8. The subversion plugin of idea has a very strange behaviour resulting in partial commits (as the lok´cal changes cache is not up to date), showing [partial] prefixes in incoming history. – Arne Burmeister Jan 20 '09 at 18:00
  • Refactorings like moving packages often result in unexpected changes like creation of the target dir and moving or worse replacing all files one by one. This makes later merges harder than using a commandline. Also the build in merge functionality of idea often creates garbage. – Arne Burmeister Jan 20 '09 at 18:02
  • true. i've had many problems with subversion integration in intellij 9 – Abbas Gadhia Feb 15 '13 at 07:20
-2

In eclipse it is possible to get annoyed by making a 10x10 editing area ( cols/row ) and see all the other windows at the same time.

In IntelliJ this in not possible since the 'ESC' key will close them all.

Ok, ok, I'm sorry I have to do it, shoot me now

OscarRyz
  • 196,001
  • 113
  • 385
  • 569
  • 1
    You can just double-click the title bar of the editor area in Eclipse and it will maximise it - sending the other windows into pop-out folders on the side. – RodeoClown Jul 21 '09 at 00:34
  • 1
    Using ctrl+M in Eclipse should also accomplish the same thing as double clicking, if you prefer keyboard shortcuts. – Colin K Dec 19 '10 at 20:13