Why IntelliJ idea is better than Eclipse

Source: Internet
Author: User

Http://www.oschina.net/news/26929/why-intellij-is-better-than-eclipse Holy War

There are some "timeless" questions that do not have the only correct answer, such as which one is better: windows or Linux,java or C #, and who is stronger: Chuck Norris or van Damme.

One of the jihad is the Java IDE's choice:

There is a lot of debate about which of them has more plugins, shortcuts, and so on. There are so many differences between them that it is difficult to decide what is most important.

As a result, it is said that two Ides are functionally similar, and choosing one is a matter of personal preference.

I think it's not just a matter of personal preference, there are objective reasons to show that Intellij idea is definitely better than eclipse.

I'm not going to massively compare the two nuances, such as plugins and shortcut keys. Because there are a series of blogs about these, for example: [Part 1] [Part 2] [Part 3]. I'll show you one of the biggest differences between idea and eclipse. The idea and Eclipse fans are not always known. The former has habitually used it without imagining what the IDE lacks, and the latter does not have the habit of using it and it is inconceivable that the IDE can do so well. Eclipse users are often unaware of this difference when playing with idea because they are accustomed to working in eclipse mode.

Why am I so sure?

Before I start, let me explain who I am and why my point of view is worth listening to.

I've been using Eclipse for 5 years, I know it well, I write plugins for it and really love it. Then I changed a company job and was forcibly transferred to idea, and after this breakup, I finally realized why the idea was more acute. And now I've been using idea for some years, so I can compare them both because I know them.

The main difference between idea and eclipse

The reason why idea is more acute is that idea knows the context. This is why JetBrains employees named idea as intelligent. What does it really mean? IDEA retrieves your entire project, analyzes all the content of the project, and even constructs a syntax tree. Thanks to it, at any time wherever you place your mouse, idea knows where you are and what you can do there.

Still not clear? Don't worry, after enumerating the following examples, everything is clear.

This understanding of context is manifested in many and many ways, and the following is only part of it.

1. Commissioning

Usually during the debugging process, we want to ask for some value of the expression, you need to select the expression in eclipse, it is very important to select the entire expression, otherwise you will not be able to find its value. You can then use Ctrl+shift+i to see the value of this expression.

Using idea you don't have to choose anything, you just need to move the cursor into your expression and press Alt+f8. Idea will have a good understanding of the expression you might need, and then display a dialog window with some of the suggested parameter variables it gives. You can also edit and get the value of this expression in the dialog-neutral field. It's quite convenient! Once you have tried this feature, you will no longer want to debug in eclipse.

Basically you can do the same thing on two Ides, but using idea is easier and faster. To this I seriously said that the difference is too big: like heaven and earth. In a small idea dialogue window you will be provided with AutoComplete, syntax highlighting and everything you need.

2. Automatic completion

Auto-completion makes the IDE better than Notepad, with a qualitative leap in the perception of contextual idea in this field. For example, let's start with the following line of code:

?
1 assertElement(By.id("errorMessage"), vi

Now we want to find out which options start with VI.

What does idea do? No need to wait for any keystrokes, it will immediately understand Assertelement requires an example of a conditaion class as the second argument, and in the condition class there is a static variable called visible. Idea will directly suggest the only valid option.

However, what will eclipse do? Alas, it does not understand the context, it does not know where the cursor is located is the second parameter of the Assertelement method. So when you press the "sacred" ctrl+space, Eclipse simply displays everything that starts with the VI letter in the global.

In a beautiful pop-up box I saw a lot of beautiful highlighted formatting specifications for useless information.:(

3. Refactoring

Professional programmers are able to use the refactoring capabilities provided by the IDE efficiently. All modern Ides offer many impressive refactoring features. But still, idea's refactoring is smart and smart. They can read what you need and then offer you the right solution for different situations.

For example, suppose we have a Asserterrormessageishidden method:

?
123 publicvoidassertErrorMessageIsHidden() {  assertElement(By.id("errorMessage"), Condition.visible);}

We use the string "ErrorMessage" as a parameter to the method.

Let's start with idea, place the cursor on any string "ErrorMessage", press Ctrl+alt+p (for "parameter"), and ideas will suggest which expressions we might be able to use as arguments in the string.

When the "errormessage" expression is selected, idea will suggest some possible variable names that can be used for that argument.

Monthly surprises

You will often be amazed at the smart performance of idea, such as the name of the option it prompts you for. It takes into account the method name, the variable type or even the variable value, and the name of the other such variable, with the name of the variable that you given earlier, except that you ignore your zodiac. Believe me, you're going to say, "Wow,idea can do that?" "I want to say at least once a month."

Now let's see how eclipse is giving advice.

Don't forget to select the entire "errormessage" expression. Choose a refactoring feature of "Recommended parameters" (via menus, no shortcuts available) to get almost the same results, however, Eclipse does not give the variable name hint option, but fortunately not.

Conclusion

If we choose the Java IDE, then IntelliJ idea must be better than eclipse. It's not just a matter of personal preference. From an objective perspective, idea is better. It's true that you can quickly write and modify code. It gives the appropriate name hints to find the appropriate method. It doesn't require you to choose an expression in particular to guess what you want to do and how you want to name it. Idea heralds and gives you a hint.

P.S. Remarks

I think idea is really better than eclipse as a Java IDE. If you consider other aspects of their capabilities, such as for other Ides such as C + +, Python, Scala, or as a platform for building desktop applications, Eclipse is likely to take the top place.

In fact, this is dependent on their definition, and Eclipse has positioned itself as an abstract platform to build any tool using plug-ins, while idea is positioned as a "smart Java IDE", and it is.

As a souvenir, I try to list some of the things that eclipse may be better than idea:

    • Eclipse looks great, and all blowing out SWT and local controls are used for value. Eclipse seems to be a stable and thoughtful program that has beautiful fonts and icons. But when you first see idea, it's like a gimmick toy with an incomplete icon and a clumsy swing interface.
    • Eclipse has a stronger project structure support. In idea, your project is composed of modules. In eclipse you have a workspace that is composed of projects, each of which can be opened or closed individually, grouped or hidden. But do you really need it?
    • Writing a plugin for eclipse seems simple
    • IDEA uses more system resources than eclipse. It really does work--because idea knows more,
    • Finally, Eclipse is free, but the idea community version is enough for me.

The final recommendation

If you need beautiful icons, a platform for creating desktop programs, c++ide or you work with a low-cost laptop, eclipse may be a better choice for you. But if you're a serious Java developer, you need faster and more convenient tools to focus on solving problems rather than distracting you, and idea is exactly what you need.

Via:dzone.com, Oschina original compilation

RELATED LINKS
    • IntelliJ idea in detail: please click here
    • IntelliJ Idea's: please click here.

Why IntelliJ idea is better than Eclipse

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.