{"id":1653,"date":"2016-09-20T12:52:02","date_gmt":"2016-09-20T19:52:02","guid":{"rendered":"http:\/\/10kdev.net\/?p=1653"},"modified":"2016-09-20T12:57:27","modified_gmt":"2016-09-20T19:57:27","slug":"ant-intellij-and-eclipse","status":"publish","type":"post","link":"http:\/\/10kdev.net\/?p=1653","title":{"rendered":"Ant, IntelliJ, and Eclipse"},"content":{"rendered":"<p>And it&#8217;s way in the future and here we are again arguing about which IDE is better: IntelliJ or Eclipse. \u00a0It never goes away. \u00a0And NetBeans is still the choice of newbs, and gets cast aside for enterprise work. \u00a0Personally I never look at it so it&#8217;s not in this discussion. \u00a0We are talking PRACTICE.<\/p>\n<p>I use IntelliJ quite a bit. \u00a0I have to admit I do like the UX and the search is fabtastic. \u00a0Many would say that IntelliJ takes over those mundane low level things so you can code. \u00a0However I use IntelliJ more like a fancy task editor with terminal operations on the side.<\/p>\n<p>I also use Eclipse. \u00a0I have to admit I like the way Eclipse integrates with very well with command line tools, servers, testing and it&#8217;s handling of class navigation. \u00a0In fact for many of the Java-specific tasks I would say I definitely prefer Eclipse. \u00a0And what is wrong with low-level control over code? \u00a0Nothing for a more guts-n-girder coder such as myself.<\/p>\n<p>There is a social aspect I do not like about IntelliJ. \u00a0It crosses into an irrational \u00a0&#8220;Macs are the best&#8221; type of mentality. \u00a0This type of view skews the fact that there isn&#8217;t really a great tool and I like teams that have people doing any kind of tool so your project does not get strapped to the IDE.<\/p>\n<p>Eclipse, with all it&#8217;s plugins, and workspace mechanic, test integrations &#8212; it can become a taskmaster making your life too much of a compliance hell. \u00a0I&#8217;ve seen whole projects strapped to Eclipse; in fact I think it lends itself more than IntelliJ to this due to *choices* &#8212; lots of choices. \u00a0Its roots with WebSphere are a testimony to this project dependency-ism. \u00a0I find it a little easier to exercise restraint in IntelliJ than Eclipse &#8212; probably due to the mundane management differences.<\/p>\n<hr \/>\n<p>Recently working on some ant on a project I was new to, I was switching back and forth IDEs to decide what I&#8217;d like. \u00a0The project was ANT build\u00a0based and I had to merge two huge branches. \u00a0A nasty merge. \u00a0So I used SourceTree\/command line git as I usually do.<\/p>\n<p>I resolved my conflicts in IntelliJ. \u00a0It was better.<\/p>\n<p>I did my builds and ant management from Eclipse. \u00a0It was better.<\/p>\n<p>Then after my first round of roughly 70 files merged I came back to do some optimization. \u00a0During that I decided to optimize the imports, and for kicks used IntelliJ (usually I use Eclipse for code quality).<\/p>\n<p>IntelliJ messed up the imports. \u00a0It decided to take some of the necessary dependencies out . . . and broke my build. I went back to Eclipse to resolve these issues and decided to write this blog piece up; and here you are, one of the subtle issues between the IDEs; in this case Eclipse gets the nod. \u00a0(Also for import optimization &#8212; Eclipse didn&#8217;t mess it up.)<\/p>\n<p>For this file, IntelliJ removed the IOException import directive. \u00a0I did an ant build, and you&#8217;ll notice a few things:<\/p>\n<ol>\n<li>The\u00a0error in the code is <em><strong>not<\/strong><\/em>\u00a0underlined.<\/li>\n<li>The ant output is <em><strong>not <\/strong><\/em>hyperlinked.<\/li>\n<li>If I want to fix the code there is <em><strong>no<\/strong><\/em> convenient highlight-and-fix.<\/li>\n<\/ol>\n<div style=\"width: 561px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/10kdev.net\/wp-content\/uploads\/2016\/09\/8718b626a19ce942d3ac2ecef6db011b.png\"><img decoding=\"async\" loading=\"lazy\" class=\"\" src=\"http:\/\/10kdev.net\/wp-content\/uploads\/2016\/09\/8718b626a19ce942d3ac2ecef6db011b.png\" width=\"551\" height=\"159\" \/><\/a><p class=\"wp-caption-text\">View of erring class in IntelliJ with ant build output.<\/p><\/div>\n<p>Now let&#8217;s compare this to the view of the same thing\u00a0in Eclipse:<\/p>\n<ol>\n<li>The\u00a0error in the code <em><strong>is<\/strong><\/em>\u00a0underlined.<\/li>\n<li>The ant output\u00a0<em><strong>is\u00a0<\/strong><\/em>hyperlinked.<\/li>\n<li>If I want to fix the code there <em><strong>is<\/strong><\/em> a\u00a0convenient highlight-and-fix.<\/li>\n<\/ol>\n<div style=\"width: 562px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/10kdev.net\/wp-content\/uploads\/2016\/09\/ed52efe22aca2d74ec42de13c1325960.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/10kdev.net\/wp-content\/uploads\/2016\/09\/ed52efe22aca2d74ec42de13c1325960.png\" width=\"552\" height=\"182\" \/><\/a><p class=\"wp-caption-text\">View of erring class in Eclipse with ant build output.<\/p><\/div>\n<p>&nbsp;<\/p>\n<div style=\"width: 561px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/10kdev.net\/wp-content\/uploads\/2016\/09\/6c7c573f59b7156642b7102db6642bfa.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/10kdev.net\/wp-content\/uploads\/2016\/09\/6c7c573f59b7156642b7102db6642bfa.png\" width=\"551\" height=\"183\" \/><\/a><p class=\"wp-caption-text\">Convenient highlight-and-fix in Eclipse.<\/p><\/div>\n<p>So that really sums it up for me in this use case: Eclipse has better\u00a0class navigation, class resolution and class tooling when doing these command line and refactor type tasks. \u00a0I find it a bit disturbing that IntelliJ removed this import during its optimization operation; but I keep learning not to trust my tools completely.<\/p>\n<p>I will continue to use both IDEs of course. \u00a0Each has their merit.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>And it&#8217;s way in the future and here we are again arguing about which IDE is better: IntelliJ or Eclipse. \u00a0It never goes away. \u00a0And NetBeans is still the choice of newbs, and gets cast aside for enterprise work. \u00a0Personally I never look at it so it&#8217;s not in this discussion. \u00a0We are talking PRACTICE. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,1],"tags":[],"_links":{"self":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts\/1653"}],"collection":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1653"}],"version-history":[{"count":7,"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts\/1653\/revisions"}],"predecessor-version":[{"id":1660,"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts\/1653\/revisions\/1660"}],"wp:attachment":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1653"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1653"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1653"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}