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

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

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


当前回答

IntelliJ做了而Eclipse没有做的两件事对我来说非常有价值:

方法分隔符:方法之间那些模糊的灰色线条使代码更具可读性

文本抗锯齿:使代码在IDE中看起来很漂亮

其他回答

引入变量。(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键之前轻松更改变量的名称)

回答的序言:我对Eclipse的使用是有限的。我们需要一个Java IDE在Windows和Mac上都能运行,而Mac的移植速度越来越慢。这是几年前的事了,我相信现在没问题了。但这正是我们转向IntelliJ的原因,我们对它很满意。

现在是我的答案:我还没有看到提到的一个很大的区别是,IntelliJ/Jet Brains的技术支持更好。我们向JetBrains发送电子邮件,并在不到一个小时内得到明确的答复。寻找Eclipse问题的答案通常会得到“你这个愚蠢的白痴”的答案(通常是一小部分回答),同时还有大量有见解的、有帮助的回答。但要得到真正的答案还需要一些梳理。

其他一些事情:

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具有从代码到jspx文档的智能感知和重构支持。

目前,它是唯一一个可以将标签撕下到另一个窗口。当你有更多的屏幕时很方便。