Rectangle 27 0

java Things possible in IntelliJ that aren't possible in Eclipse?


<property name="propName" ref="<hit CTRL-SPACE>"
<ui:obfuscateJavaScript>function something(){...}</ui:obfuscateJavaScript>
Country c = p.getAddress().getCountry();
function Person(name,address) {
    this.getName = function() { return name };
    this.getAddress = function() { return address };
}

Person.prototype.hello = function() {
    return "I'm " + this.getName() + " from " + this.get<CTRL-SPACE>;
}
interface Country{
}
interface Address {
    String getStreetAddress();
    String getZipCode();
    Country getCountry();
}
interface Person {
    String getName();
    Address getAddress();
    int getAge();
}
//--- 
Person p;
Country c = p.<CTRL-SHIFT-SPACE>
interface Person {
    String getName();
    String getAddress();
    int getAge();
}
//---
Person p;
String name = p.<CTRL-SHIFT-SPACE>

Autocomplete in HSQL expressions, in Hibernate configuration (including class, property and DB column names), in Spring configuration

Autocomplete in HTML tag attributes. Autocomplete in style attribute of HTML tags, both attribute names and values. Autocomplete in class attributes as well. Type <div class="<CTRL-SPACE> and it will show you list of CSS classes defined in your project. Pick one, ctrl-click on it and you will be redirected to where it is defined.

CTRL-click that brings you to where clicked object is defined works everywhere - not only in Java classes and variables in Java code, but in Spring configuration (you can click on class name, or property, or bean name), in Hibernate (you can click on property name or class, or included resource), you can navigate within one click from Java class to where it is used as Spring or Hibernate bean; clicking on included JSP or JSTL tag also works, ctrl-click on JavaScript variable or function brings you to the place it is defined or shows a menu if there are more than one place, including other .js files and JS code in HTML or JSP files.

Did I mention autocomplete and ctrl-clicking in paths to files, like <script src="", <img src="", etc?

For the eclipse debugging view there is an option to show the contents of the collections rather than the implementation details. For lists and sets, it'll show their contents. For maps, it'll show a list of key-value pairs. It's also possible to set custom displays up.

It allows to to specify that I need all .jars inside WEB-INF\lib folder, without picking each file separately, so when someone commits new .jar into that folder it picks it up automatically.

It validates Spring and Hibernate configuration right when you edit it, so I do not need to restart server to know that I misspelled class name, or added constructor parameter so my Spring cfg is invalid.

Last time I tried, I could not run Eclipse on Windows XP x64.

Latest version has language injection, so you can declare that you custom JSTL tag usually contains JavaScript and it will highlight JavaScript inside it.

Mentioned above is probably 10% of what it does. I do not use Maven, Flex, Swing, EJB and a lot of other stuff, so I can not tell how it helps with them. But it does.

Most of your examples are available in Eclipse, either directly or via 3rd party plugins. I know of no one who uses an external tool for svn merge in Eclipse. For spring/hibernate/javascript editors (and autocomplete) there are 3rd party plugins. As for regex and jsp EL, you beat me :)

Smart autocomplete in JavaScript.

The Jboss Tools plugin adds autocomplete of Hibernate and JSF expressions.

The two examples about auto-completing java code work identically in eclipse. Could someone with more rep delete just the java examples please?

There are few features which I'm not sure are present in Eclipse or not. But at least each member of our team who uses Eclipse, also uses some merging tool to merge local changes with changes from source control, usually WinMerge. I never need it - merging in IDEA is enough for me. By 3 clicks I can see list of file versions in source control, by 3 more clicks I can compare previous versions, or previous and current one and possibly merge.

Type Pattern.compile(""); put \\ there, hit CTRL-SPACE and see helpful hint about what you can put into your regular expression. You can also use language injection here - define your own method that takes string parameter, declare in IntelliLang options dialog that your parameter is regular expression - and it will give you autocomplete there as well. Needless to say it highlights incorrect regular expressions.

Very smart autocomplete in Java code:

When I look at HashMap in debugger's watch window, I see logical view - keys and values, last time I did it in Eclipse it was showing entries with hash and next fields - I'm not really debugging HashMap, I just want to look at it contents.

You can use Find Usages of any Java class or method and it will find where it is used including not only Java classes but Hibernate, Spring, JSP and other places. Rename Method refactoring renames method not only in Java classes but anywhere including comments (it can not be sure if string in comments is really method name so it will ask). And it will find only your method even if there are methods of another class with same name. Good source control integration (does SVN support changelists? IDEA support them for every source control), ability to create a patch with your changes so you can send your changes to other team member without committing them.

and it shows ONLY getName() and getAddress(), no matter how may get* methods you have in other JS objects in your project, and ctrl-click on this.getName() brings you to where this one is defined, even if there are some other getName() functions in your project.

and it shows you ONLY getName(), getAddress() and toString() (only they are compatible by type) and getName() is first in the list because it has more relevant name. Latest version 8 which is still in EAP has even more smart autocomplete.

and it will show you list of those beans which you can inject into that property.

and it will suggest you person.name or person.address. Ctrl-click on person.name and it will navigate you to getName() method of Person class.

Note
Rectangle 27 0

java Things possible in IntelliJ that aren't possible in Eclipse?


<property name="propName" ref="<hit CTRL-SPACE>"
<ui:obfuscateJavaScript>function something(){...}</ui:obfuscateJavaScript>
Country c = p.getAddress().getCountry();
function Person(name,address) {
    this.getName = function() { return name };
    this.getAddress = function() { return address };
}

Person.prototype.hello = function() {
    return "I'm " + this.getName() + " from " + this.get<CTRL-SPACE>;
}
interface Country{
}
interface Address {
    String getStreetAddress();
    String getZipCode();
    Country getCountry();
}
interface Person {
    String getName();
    Address getAddress();
    int getAge();
}
//--- 
Person p;
Country c = p.<CTRL-SHIFT-SPACE>
interface Person {
    String getName();
    String getAddress();
    int getAge();
}
//---
Person p;
String name = p.<CTRL-SHIFT-SPACE>

Autocomplete in HSQL expressions, in Hibernate configuration (including class, property and DB column names), in Spring configuration

Autocomplete in HTML tag attributes. Autocomplete in style attribute of HTML tags, both attribute names and values. Autocomplete in class attributes as well. Type <div class="<CTRL-SPACE> and it will show you list of CSS classes defined in your project. Pick one, ctrl-click on it and you will be redirected to where it is defined.

CTRL-click that brings you to where clicked object is defined works everywhere - not only in Java classes and variables in Java code, but in Spring configuration (you can click on class name, or property, or bean name), in Hibernate (you can click on property name or class, or included resource), you can navigate within one click from Java class to where it is used as Spring or Hibernate bean; clicking on included JSP or JSTL tag also works, ctrl-click on JavaScript variable or function brings you to the place it is defined or shows a menu if there are more than one place, including other .js files and JS code in HTML or JSP files.

Did I mention autocomplete and ctrl-clicking in paths to files, like <script src="", <img src="", etc?

For the eclipse debugging view there is an option to show the contents of the collections rather than the implementation details. For lists and sets, it'll show their contents. For maps, it'll show a list of key-value pairs. It's also possible to set custom displays up.

It allows to to specify that I need all .jars inside WEB-INF\lib folder, without picking each file separately, so when someone commits new .jar into that folder it picks it up automatically.

It validates Spring and Hibernate configuration right when you edit it, so I do not need to restart server to know that I misspelled class name, or added constructor parameter so my Spring cfg is invalid.

Last time I tried, I could not run Eclipse on Windows XP x64.

Latest version has language injection, so you can declare that you custom JSTL tag usually contains JavaScript and it will highlight JavaScript inside it.

Mentioned above is probably 10% of what it does. I do not use Maven, Flex, Swing, EJB and a lot of other stuff, so I can not tell how it helps with them. But it does.

Most of your examples are available in Eclipse, either directly or via 3rd party plugins. I know of no one who uses an external tool for svn merge in Eclipse. For spring/hibernate/javascript editors (and autocomplete) there are 3rd party plugins. As for regex and jsp EL, you beat me :)

Smart autocomplete in JavaScript.

The Jboss Tools plugin adds autocomplete of Hibernate and JSF expressions.

The two examples about auto-completing java code work identically in eclipse. Could someone with more rep delete just the java examples please?

There are few features which I'm not sure are present in Eclipse or not. But at least each member of our team who uses Eclipse, also uses some merging tool to merge local changes with changes from source control, usually WinMerge. I never need it - merging in IDEA is enough for me. By 3 clicks I can see list of file versions in source control, by 3 more clicks I can compare previous versions, or previous and current one and possibly merge.

Type Pattern.compile(""); put \\ there, hit CTRL-SPACE and see helpful hint about what you can put into your regular expression. You can also use language injection here - define your own method that takes string parameter, declare in IntelliLang options dialog that your parameter is regular expression - and it will give you autocomplete there as well. Needless to say it highlights incorrect regular expressions.

Very smart autocomplete in Java code:

When I look at HashMap in debugger's watch window, I see logical view - keys and values, last time I did it in Eclipse it was showing entries with hash and next fields - I'm not really debugging HashMap, I just want to look at it contents.

You can use Find Usages of any Java class or method and it will find where it is used including not only Java classes but Hibernate, Spring, JSP and other places. Rename Method refactoring renames method not only in Java classes but anywhere including comments (it can not be sure if string in comments is really method name so it will ask). And it will find only your method even if there are methods of another class with same name. Good source control integration (does SVN support changelists? IDEA support them for every source control), ability to create a patch with your changes so you can send your changes to other team member without committing them.

and it shows ONLY getName() and getAddress(), no matter how may get* methods you have in other JS objects in your project, and ctrl-click on this.getName() brings you to where this one is defined, even if there are some other getName() functions in your project.

and it shows you ONLY getName(), getAddress() and toString() (only they are compatible by type) and getName() is first in the list because it has more relevant name. Latest version 8 which is still in EAP has even more smart autocomplete.

and it will show you list of those beans which you can inject into that property.

and it will suggest you person.name or person.address. Ctrl-click on person.name and it will navigate you to getName() method of Person class.

Note
Rectangle 27 0

java Things possible in IntelliJ that aren't possible in Eclipse?


  • SQL code validation in the strings passed as arguments to jdbc calls (and the whole newly bundled language injection stuff)
  • implemented in/overwritten in icons for interfaces & classes (and their methods) and the smart implementation navigation (Ctrl+Alt+Click or Ctrl+Alt+B)
  • linking between the EJB 2.1 interfaces and bean classes (including refactoring support); old one, but still immensely valuable when working on older projects
  • propagate parameters/exceptions when changing method signature, very handy for updating methods deep inside the call stack
Note
Rectangle 27 0

java Things possible in IntelliJ that aren't possible in Eclipse?


Well, for me it's a thousand tiny things. Some of the macros, the GUI layout in general in Eclipse I find awful. I can't open multiple projects in different windows in Eclipse. I can open multiple projects, but then it's view based system swaps a bunch of things around on me when I switch files. IntelliJ's code inspections seem better. Its popup helpers to fix common issues is nice. Lots of simple usability things like the side bar where I can hover over a hot spot and it'll tell me every implementing subclass of a method or the method I'm implementing and from where.

Whenever I've had to use, or watch someone use, Eclipse it seems like they can do most of the things I can do in IntelliJ, but it takes them longer and it's clunkier.

Note
Rectangle 27 0

java Things possible in IntelliJ that aren't possible in Eclipse?


@EngineerDollery I wouldn't say it's "wrong", since amit said "There is only one reason I use intellij and not eclipse", not "There is only one reason to use intellij and not eclipse".

It is intelligent, and damn fast. This adds up to a lot of usability features. Traversing to a subclass or implementing class, find-in-path, find usages, etc. happens so fast. Auto-complete happens inline, just a tab will insert it. Auto complete is also smart, just not pure suggestions but the IDE thinks of names etc. for you.

There is more than just one reason to use IntelliJ. Usability isn't even top of the list. There are more features in IntelliJ than Eclipse. IntelliJ has fewer plugins in total, but more 'quality' plugins. So, this answer, despite the up-votes, is wrong.

There is only one reason I use intellij and not eclipse: Usability

Whether it is debugging, refactoring, auto-completion.. Intellij is much easier to use with consistent key bindings, options available where you look for them etc. Feature-wise, it will be tough for intellij to catch up with Eclipse, as the latter has much more plugins available that intellij, and is easily extensible.

Note
Rectangle 27 0

java Things possible in IntelliJ that aren't possible in Eclipse?


@EngineerDollery I wouldn't say it's "wrong", since amit said "There is only one reason I use intellij and not eclipse", not "There is only one reason to use intellij and not eclipse".

It is intelligent, and damn fast. This adds up to a lot of usability features. Traversing to a subclass or implementing class, find-in-path, find usages, etc. happens so fast. Auto-complete happens inline, just a tab will insert it. Auto complete is also smart, just not pure suggestions but the IDE thinks of names etc. for you.

There is more than just one reason to use IntelliJ. Usability isn't even top of the list. There are more features in IntelliJ than Eclipse. IntelliJ has fewer plugins in total, but more 'quality' plugins. So, this answer, despite the up-votes, is wrong.

There is only one reason I use intellij and not eclipse: Usability

Whether it is debugging, refactoring, auto-completion.. Intellij is much easier to use with consistent key bindings, options available where you look for them etc. Feature-wise, it will be tough for intellij to catch up with Eclipse, as the latter has much more plugins available that intellij, and is easily extensible.

Note
Rectangle 27 0

java Things possible in IntelliJ that aren't possible in Eclipse?


Map<String, Integer> m = ...
m.contains|Key("Wibble");

Actually in Eclipse (at least the version I'm using), when you put your cursor on the name of a method and hit CTRL+T you get the entire hierarchy tree, from the topmost interface down to the leaf implementations, and can jump to any of them.

If you have the cursor on a method then CTRL+SHIFT+I will popup the method implementation. If the method is an interface method, then you can use up- and down- arrows to cycle through the implementations:

In Eclipse you can also Ctrl+Click the method name to jump to the method definition / implementation (depending on context)

In Eclipse you just hover the method name with Shift to open popup with its implementation

The point is that you're not actually navigating to the implementation. It is just shown popup, just like javadoc etc.

Note
Rectangle 27 0

java Things possible in IntelliJ that aren't possible in Eclipse?


Map<String, Integer> m = ...
m.contains|Key("Wibble");

Actually in Eclipse (at least the version I'm using), when you put your cursor on the name of a method and hit CTRL+T you get the entire hierarchy tree, from the topmost interface down to the leaf implementations, and can jump to any of them.

If you have the cursor on a method then CTRL+SHIFT+I will popup the method implementation. If the method is an interface method, then you can use up- and down- arrows to cycle through the implementations:

In Eclipse you can also Ctrl+Click the method name to jump to the method definition / implementation (depending on context)

In Eclipse you just hover the method name with Shift to open popup with its implementation

The point is that you're not actually navigating to the implementation. It is just shown popup, just like javadoc etc.

Note
Rectangle 27 0

java Things possible in IntelliJ that aren't possible in Eclipse?


ALT-SHIFT-Q brings up a Show View window... C is for console ALT-SHIFT-Q, C is the shortcut to go to the console.

All this of course is subjective. How can we measure user experience?

Ctrl+Shift+L shows you a list of hotkeys available in the current context.

Double-click on a sub-window title -- ANY sub-window -- and your sub-window blows out to the full screen. Do it again for restore. Minimize the panel with the console, and then when output happens, the console pops up instantly.

Eclipse handles faster larger projects ( +300 jars and +4000 classes ) and I think IntelliJ Idea 8 is working on this.

For instance both have editor surrounded with dock panels for project, classpath, output, structure etc. But in Idea when I start to type all these collapse automatically let me focus on the code it self; In eclipse all these panels keep open leaving my editor area very reduced, about 1/5 of the total viewable area. So I have to grab the mouse and click to minimize in those panels. Doing this all day long is a very frustrating experience in eclipse.

Probably is not a matter of what can/can't be done, but how.

Probably there's a shortcut for this in eclipse ( autohide output window while editing and autoshow it when running the program ) , but as some other tens of features the shortcut must be hunted in forums, online help etc while in Idea is a little bit more "natural".

The exact opposite thing happens with the view output window. In Idea running a program brings the output window/panel to see the output of the program even if it was perviously minimized. In eclipse I have to grab my mouse again and look for the output tab and click it to view my program output, because the output window/panel is just another one, like all the rest of the windows, but in Idea it is treated in a special way: "If the user want to run his program, is very likely he wants to see the output of that program!" It seems so natural when I write it, but eclipse fails in this basic user interface concept.

This can be repeated for almost all the features both have, autocomplete, word wrap, quick documentation view, everything. I think the user experience is far more pleasant in Idea than in eclipse. Then the motto comes true "Develop with pleasure"

Wow... thanks a lot. It would be very helpful if eclipse had a way I know this ( beside reading the hotkey cheat sheet ) Thanks a lot. Is there a way yo change to the output window?

in eclipse you can press control-m to min/max the edit window, or double-click its editor tab - this helps a great deal

Note
Rectangle 27 0

java Things possible in IntelliJ that aren't possible in Eclipse?


Eclipse is open source. No one is paid for answering questions or fixing bugs. Buy commercial Eclipse-based IDE e.g. MyEclipse and get support for your money. Quick stats: I've reported to JetBrains 56 bugs, 23 of them are closed; from 65 bugs reported to Eclipse 33 are closed. The only difference is that JetBrains fixes bugs slightly faster than Eclipse.

Now for my answer: One big difference I haven't seen mentioned yet is that tech support is better with IntelliJ/Jet Brains. We send an e-mail to JetBrains and get a definitive answer back in less than an hour. Looking for answers to Eclipse problems results in the usual, "You stupid idiot" answers (usually a small number of the replies) along with the much larger number of insightful, helpful replies. But it takes some sorting through to get the real answer.

Preamble to my answer: My use of Eclipse is limited. We needed a Java IDE to work on both Windows and Mac and the Mac port slowed down day by day. This was years ago and I'm sure it's OK now. But that is what got us to switch to IntelliJ and we've been happy with it.

Note