Why Eclipse is better or worse…

A sacred controversy
It is considered that there are “eternal” questions to which there is no right answers. For example, what is better: Windows or Linux, Java or C #; Alien vs. Predator or Chuck Norris or Van Damm. One of these holivars is the selection best IDE for Java.
There are constant debates which of them has more plugins, hotkeys etc. There are so many differences that it is too difficult to choose which of them is more important…and the choice, as a rule, is a matter of taste. Still there are objective reasons why Intellij IDEA is defenetly better than Eclipse. Please notice that we are considering teo environments as Java IDE.

I’m not going to speak about a lot of small differences like the plugins, hotkeys, etc, but I`d like to explain only one, the most important difference. As a rule it is unknown neither to users of IDE, nor to users of Eclipse, because the first are used to it and don’t know that it could not exist in other IDE and the latter are used to living without it, and not even guess what life could be better. Moreover Eclipse users do not notice this difference when trying IDEA for fun, as used to work in their old manner.

The main thing that distinguishes IDEA – it understands the context. That is what employees of JetBrains mean when call it “intellectual» (intelligent). What does it mean? IDEA indexes all in your project, analyze everything in it and even builds a syntax tree. Due to this IDEA, at any time, wherever you put the cursor knows where you are and what can be done. This ability “to understand” the context is expressed in many ways. Here are just a few.

1) Debugging
To see some expression while debugging in Eclipse at first you must to identify the expression. And be sure that you select right, if you select the extra character by chance Eclipse does not understand. Press Ctrl + Shift + I and see what you get.
No needs to do it in IDEA. Just put the cursor in the desired location and press Alt + F8. IDEA will understand itself what expression you probably need and immediately open a dialog where you can edit the expression and immediately see its value.
It turns out that both IDE and Eclipse, in principle, allow you to do the same thing, but in IDEA is much easier and faster. It is a huge difference like heaven and earth. In this small window IDEA can make you autofilling, the syntax highlighting and everything etc.

2) Autofilling
Autofilling is what distinguishes any of the IDE from notepad. In this area of ” understanding of context” IDEA has a qualitative advantage. For example, we start writing a line of code, then we want to know what options we have and what may begin with certain letters (for instance “vi” or smth like that). What does the IDEA do? Doesn’t wait for any keystroke, it immediately realizes that the method assertElement wants to get the second parameter an object of class Condition, and this class is just a static variable of type Condition named visible. And offers the only option. What does Eclipse do? Alas, it doesn’t understand the context and doesn’t know that the cursor is on the site of the second parameter of the method assertElement. So when you press Ctrl Space, Eclipse shows stupidly all that begins with the letters «vi» in nature.

3) Refactoring
Professional programmers can be productive, using the refactorings for changing code that offers their IDE. All modern IDE, in principle, offer a very impressive set of refactorings, perhaps even most programmers don’t know and use all of them. But again notice that there are smart refactorings in IDEA. They realize what you want, and offer different options that are suitable for most situations.
For example, we have a method assertErrorMessageIsHidden:
public void assertErrorMessageIsHidden () {assertElement (By.id (“errorMessage”), Condition.visible);}
And we want to make sure that the string «errorMessage» came to the method as a parameter.

Let’s start with IDEA. Put the cursor anywhere on the line «errorMessage», press Ctrl + Alt + P (from «parameter»), and IDEA tells what expression we could make in the parameter. As soon as the expression «errorMessage» selected, IDEA suggests several possible names for this parameter. It takes into account the name of the method and type of the variable and value, and the names of these variables in other places, and those names that you has given such a variable before – except that your zodiac sign is ignored J

Well, let’s see what Eclipse offers.

Do not forget: select the expression «errorMessage» (always with quotation marks, otherwise the message will get a wild pharse «An expression must be select to activate this refactoring»), select Refactor «Introduce parameter» and get the same result . However, there are no options suggests a parameter name of, but thanks for that 🙂

– Outputs
If we’re talking about Java IDE, then IDEA steeper Eclipse and it is not just a matter of taste. IDEA is objectively better, quicker and easier to write and change the code, it suggests appropriate names, find the appropriate methods, it does not require just select the expression, but guesses what you want to do and want to call. IDEA anticipates and suggests.

– PS
Reservation: IDEA is better than Eclipse as Java IDE. If you consider them in some other capacity – such as the IDE for other languages (C + +, Python, Scala), or as a platform for building Desktop-Application, Eclipse may win well.
In general, this follows from the definition. Eclipse has positioned itself as an abstract platform for building anything was (using append plug-ins), and IDEA is positioning itself as a “smart IDE for Java». So it is.
For the sake of interest I will try to include some aspects in which the Eclipse, possibly steeper than IDEA:
· Eclipse is beautiful. All this fuss about SWT and native controls worthed it.
· Eclipse looks like a solid well thought-out application with fonts and icons, while the IDEA at first glance looks like a laptop hack with icons and awkward interface.
· Support for the project structure is richer in Eclipse.
· There is a project consisting of modules, and the Eclipse is the workspace, consisting of projects, but they can also close / open, the grouping and hide in IDEA.
· It seems is it easier to write plug-ins in Eclipse.
· And after all, Eclipse is free.

I would like to know what do you think about it?

Thank you so much and you are welcome with your comments.

Elvira Golyak

Business Development Manager