Use Eclipse as diff tool

Coming from the windows platform I am used to tools like WinMerge or AraxisMerge (commercial) that offer a more comfortable way to compare the content of files than diff --side-by-side. To my suprise I did not find a single useful external diff tool for Mac OS.

More or less accidentally while working with Eclipse and CVS and its function “Compare with latest from HEAD” I stumbled on a grayed menu item that says “…with each other”.

It turns out that Eclipse supports comparing arbitrary files two-way and even three-way. You simply have to select the files to compare and invoke the context menu. Those files only need to be in your workspace. It is not necessary to have them under revision control. Great!

Support my Work

Writing an article like the one you have just read takes me quite an amount of my personal time. Way too often, I invest this time in different interests and decide against another blog post. On the other hand, you can motivate me with your feedback, your thoughts and your ideas. Please leave a comment below or flattr this post if you think it's worth it.

Comments

  1. Denis Roy says:

    Whenever I upgrade Eclipse.org software that has code hacks, I load up the current code as a project, and the newest version as another project. You can then select both projects and Compare together. It is absolutely awesome, as it will allow you to easily merge your changes into the new code.

    Eclipse rocks.

  2. Jörg Reichert says:

    I had the same problem under Mac OS not having a neat diff tool comparable to WinMerge under Windows. But I recently found [[http://meld.sourceforge.net/|Meld]] that fills that gap for me. The capability of Eclipse to compare two files within a workspace (beside the CVS and local history comparison) was also new to me though.

  3. Wow, thank you for that pointer, Jörg. Meld looks quite good.

  4. Ivica Loncar says:

    http://andrei.gmxhome.de/anyedit/ offers even more features.

  5. Well, not the very best Merge Tool compared to Araxis, but the Merge-Tool from XCode is quite usable.
    And by the way: Araxis has released three month ago a Mac-Version of Araxis Merge…
    (http://www.araxis.com/merge_mac/Download.html)

  6. Thank you for that hint, Michael. Must have been blind.

  7. Axel Terfloth says:

    The Tool FileMerge.app is part of the OS X Developer Tools. They are not preinstalled but you’ll find the packages on you Installation DVDs.

  8. Nancy says:

    I have tried many merge tools on both Windows and MacOS X. My prefered is ECMerge (www.elliecomputing.com). Cheap and efficient…

  9. I found I like Changes.app as a diff tool on Mac. It’s not free, and it’s missing a few features, but it’s as close to BeyondCompare as I think you can get right now. http://changesapp.com/

  10. Dave Kelly says:

    For a good diff tool try DeltaWalker – based on the Eclipse RCP UI libraries it looks and feels like eclipse and works really well (but it’s not free)

  11. Dave Kelly says:

    Oh, forgot to mention – try the diff tool in NetBeans – NetBeans (from Sun/Oracle) is free and it’s diff tool is much better than the default Eclipse offering. It is Java based like Eclipse and DeltaWalker so runs on Mac as well as Windows and Linux

  12. visu says:

    thanks Heiko its very use full suggiestion for me……….:)

  13. ed says:

    +1 for FileMerge on Mac OS.

    It’s a great diff tool for Mac that comes with the Developer Tools.

    I can’t believe so many people weren’t aware of this!!

  14. Jeff Younker says:

    Surprisingly p4merge available with perforce’s P4V is quite a nice diff/merge tool. It’s free too.

  15. Nikk says:

    FileMerge.app, as noted by folks previously, indeed does not suck. It can also be called from command line by using the command ‘opendiff’. Check it’s man page to find out more.

    Also, might be good to edit the post to at least put in the mention that you are now aware of FileMerge.app ;)

Leave a Reply