There are some "eternal" questions that have no single correct answer, for example, which is better: Windows or Linux, Java or C#; who is stronger: Chuck Norris or Van Damme.
There is a lot of debate about which of them has more plugins, shortcuts, etc. There are so many differences between them that it's hard to decide what's most important.
Thus, people say that both IDEs are functionally similar, and choosing one over the other is a matter of personal preference.
I won't make a lot of comparisons between the two, such as plugins and shortcuts. Because there are a series of blogs about these. I will show one of the biggest differences between IDEA and Eclipse. Usually the supporters of IDEA and Eclipse have never understood it.
The former has used it habitually and never imagined what would happen if the IDE lacked it, while the latter has no habit of using it and it is hard to imagine that the IDE can do so well with it. Eclipse users usually don't realize this difference when playing with IDEA, because they are used to working in Eclipse mode.
Before I begin, let me explain who I am and why my opinion is worth hearing.
I've been using Eclipse for 5 years, I know it well, I write plugins for it and really love it. Then, I changed jobs in another company and was forcibly transferred to IDEA for development. After this "breakup", I finally realized why IDEA was more sharp. And now I've been using IDEA for a few years, so I can compare the two because I know them both.
The reason why IDEA is more sensitive is: IDEA understands the context. This is why JetBrains employees named IDEA as intelligent. What does it really mean?
section>IDEA retrieves your entire project, analyzes all the content of the project, and even builds a syntax tree. Thanks to it, at any time no matter where you place the mouse, IDEA knows where you are and what you can do there.
Still confused? Don't worry, everything will be clear after listing the following few examples.
This understanding of context manifests itself in many, many ways, the following are just a few.
1. Debug Usually in the debugging process, we want to ask for the value of some expressions. In Eclipse, you need to select this expression and select the entire expression The formula is very important, otherwise you will not be able to find its value. Then, you can use Ctrl+Shift+I to see the value of this expression.
Using IDEA you don't need to select anything, you just need to move the cursor to your expression and press Alt+F8. IDEA will understand the expression you may need very well, and then display a dialog window with some suggested parameter variables it gives. You can also edit and get the value of this expression immediately in the dialog. Quite convenient! After trying this feature, you will never want to debug in Eclipse again.
Essentially both IDEs allow you to do the same thing, but it's easier and faster to use IDEA. In this regard, I seriously say that the difference is too great: just like heaven and earth. Auto-completion, syntax highlighting and everything you need in a small IDEA dialog window.
2. Auto-completion Auto-completion makes IDE better than notepad, and IDEA, which can perceive context in this field, has made a qualitative leap. For example, we start with the following line of code:
assertElement(By .id('errorMessage' ), vi
Now we want to find out what options start with vi.
How does IDEA do it? Without waiting for any key presses, it immediately understands that assertElement expects an instance of the Conditaion class as the second parameter, and in the Condition class there is a static variable called visible. IDEA will directly suggest this only valid option.
However, what will Eclipse do? Alas, it doesn't understand the context, it doesn't know that the cursor is the second parameter of the assertElement method. So when you press the "sacred" Ctrl+Space, Eclipse will simply display everything in the world that starts with the letter vi.
I see a lot of nicely highlighted formatting norms and useless information in a nice popup. :(
3. Refactoring Professional programmers can efficiently use the refactoring function provided by the IDE. All modern IDEs offer many impressive refactoring features. But again, IDEA's refactoring function is also very smart. They can understand what you need, and then provide you with the most suitable solution for different situations.
For example, suppose we have an assertErrorMessageIsHidden method:
public void assertErrorMessageIsHidden () { assertElement(By.id('errorMessage' ), Condition.visible); }
We take the string "errorMessage" as a parameter to this method.
Let's start with IDEA, place the cursor on any string "errorMessage", press Ctrl+Alt+P (for "parameter"), and IDEA will suggest which expressions we might be able to use in this string as a parameter.
When the "errorMessage" expression is selected, IDEA will suggest some possible variable names that can be used as the parameter.
< section powered-by='xiumi.us' > 04 Surprises from time to time
section> You will often be amazed at the smart performance of IDEA, for example, it prompts you for the names of some options. It takes into account method names, variable types and even variable values, and other names of such variables, with the name you gave this variable before, except ignoring your zodiac sign. Believe me, you will want to say "Wow, IDEA can do this?", I would say at least once a month.
section>Now let's see how Eclipse makes suggestions.
Don't forget to select the entire 'errorMessage' expression. Selecting a "recommended parameters" refactoring feature (via the menu, no shortcuts available) yields pretty much the same result, however, Eclipse doesn't give you the option to prompt for variable names, but thankfully it doesn't.
< section powered-by='xiumi.us' > section> If we choose Java IDE, then Intellij IDEA is definitely better than Eclipse. It's not just a matter of personal preference. Objectively speaking, IDEA is better. It allows you to write and modify code quickly and easily. It gives appropriate name hints to find suitable methods. It guesses what you want to do and how you want to name it without you having to specifically choose the expression. IDEA heralds and gives you hints.
section> I think IDEA is indeed better than Eclipse as a Java IDE. If you consider their other capabilities such as being used on other IDEs such as C++, Python, Scala, or as a platform for building desktop applications, Eclipse is likely to come out on top.
section>In fact, this depends on their definition. Eclipse has positioned itself as an abstract platform for building any tool using plug-ins, while IDEA is positioned as an "intelligent Java IDE ’, and it does.
As a souvenir, I try to list some places where Eclipse may be better than IDEA:
Eclipse looks better, all the fussy SWT and native controls are worth it. Eclipse looks like a solid well thought out program with nice fonts and icons. However, when I first saw IDEA, it was like a gimmick toy, with incomplete icons and a clumsy Swing interface.
Eclipse has stronger project structure support. In IDEA, your project is composed of modules. In Eclipse you have a workspace made up of projects, each of which can be individually opened or closed, grouped or hidden. But do you really need it?
Writing a plugin for Eclipse seems easy.
IDEA uses more system resources than Eclipse. This actually makes sense - because IDEA does more.
Finally, Eclipse is free, but the IDEA Community version is enough for me.
If you need beautiful icons, a platform for creating desktop programs, C++IDE or you use a If you don't want to work on a laptop with a low configuration, then Eclipse may be a better choice for you. But if you are a serious Java developer and you need faster and more convenient tools to help you focus on solving problems instead of distracting you, IDEA is exactly what you need.
---END---
Dangerous! Please stop using third-party WeChat immediately! Big title.
He just wanted to live, but died helplessly in the end!
Musk makes aerospace history! I really admire~
Cool command line terminal! Windows Terminal 1.0 is finally officially released!
评论列表(196条)
测试