我听说有人选择了其中一种方式,并对其中一种方式发誓。

作为一个Eclipse的忠实粉丝,但没有时间尝试IntelliJ,我很有兴趣从“前Eclipse用户”IntelliJ用户那里听到一些用IntelliJ可以做而用Eclipse不能做的具体事情。

注意:这不是一个主观的问题,也不意味着变成一场IDE圣战。请为任何煽动性的答案投票。


当前回答

两者有许多不同的特性和工作流程,这在所有的答案中都很明显。然而,我认为在决定使用哪种框架时,也应该考虑使用每种工具所能提高的总体生产力。

我是Netbeans和Eclipse的忠实粉丝,并且已经使用它们很多年了。它们都是很好的工具,根据您正在做的事情,您可能想要选择其中一个。

然而,大约六个月前,当我在一个复杂的java web项目中工作时,由于js的自动完成错误,我被迫寻找Eclipse的替代品。我是如此绝望,我正在考虑回到一个简单的文本编辑器为我的js代码!!

我只是碰巧遇到了Intellij Idea(不幸的是没有时间研究工具)。

虽然需要一些时间来适应Idea的做事方式,除了特殊的功能之外,在我看来,它从左到右的小事情上提供的生产力提高是最大的资产。它更适合我,我现在是Idea Ultimate的付费客户。一旦你习惯了这一点,就很难再去做别的事情了。

没有什么比免费更好的了,我是开源的忠实粉丝,但最终如果你以开源为生,那么每次都能更快地完成任务。

其他回答

引入变量。(Windows下按Ctrl+Alt+V, OSX下按Cmd+Alt+V)

假设调用service。listallpersons()方法 按Ctrl+Alt+V并回车,方法调用的返回值的变量被插入:

List<Person> list = service.listAllPersons();

节省输入,并且不必检查所调用方法的返回类型。在使用泛型时尤其有用,例如:

new ArrayList<String>()

(引入变量)

ArrayList<String> stringArrayList = new ArrayList<String>();

(当然,你可以在按Enter键之前轻松更改变量的名称)

其他一些事情:

propagate parameters/exceptions when changing method signature, very handy for updating methods deep inside the call stack 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

在IntelliJ中,您可以通过“最后编辑位置”跳过最后编辑位置的历史。Eclipse也有类似的特性,但是Eclipse只返回到编辑位置的一个级别。

拥有历史记录而不仅仅是Eclipse提供的一个级别是一个很好的生产力特性:它充当了一种自动书签的形式,因为您经常希望跳转回您进行更改的地方。我每天都要使用这个功能几次,当我被要求使用Eclipse来做某些事情时,我感到没有这个功能的痛苦。

有很多事情是idea用更简单的方法解决的,或者没有等价的方法:

Autocomplete actions: Doing ctrl+shift+a you can call any idea action from the keyboard without remembering its key combination... Think about gnome-do or launchy in windows, and you've got the idea! Also, this feature supports CamelCasing abbreviations ;) Shelf: Lets you keep easily some pieces of code apart, and then review them through the diff viewer. Local history: It's far better managed, and simpler. SVN annotations and history: simpler to inspect, and also you can easily see the history only for such a part of a whole source file. Autocomplete everywhere, such as the evaluate expression and breakpoint condition windows. Maven integration... much, much simpler, and well integrated. Refactors much closer to the hand, such as loops insertion, wrapping/casting, renaming, and add variables. Find much powerful and well organized. Even in big projects Much stable to work with several branches of a big project at the same time (as a former bugfixer of 1.5Gb by branch sources, and the need to working in them simultaneously, idea shown its rock-solid capabilities) Cleaner and simpler interface... And, simpler to use only with the keyboard, letting apart the need of using the mouse for lots of simple taks, saving you time and giving you more focus on the code... where it matters!

现在,作为开源的…Idea的用户群将呈指数级增长。

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.

每当我不得不使用Eclipse时,或者看到别人使用Eclipse时,他们似乎可以做我在IntelliJ中可以做的大部分事情,但它花费的时间更长,而且更笨重。