Developer Toolbox – Diff

Posted January 9th, 2008. Filed under Code

Ever have a file and wonder what changed? You need a diff tool!

In computing, diff is a file comparison utility that outputs the differences between two files. The program displays the changes made per line for text files.

There are diff tools available for almost any platform you can think of ranging from simple command line utilities to complex GUI based applications.

Beyond Compare screenshot Here is a screenshot using Beyond Compare comparing my current project build file to the original one when I started the project. Red means changes occurred! :)

If you use Eclipse there is a diff tool built in! Right click any file and select “Compare With”. You can compare files in your local history, and if you are using source control, you can compare with previous revisions. (In the screenshot below I have a BeyondCVS plugin installed which allows me to use Beyond Compare within Eclipse).

Beyond Compare within Eclipse

Many tools will also let you compare not only files but directories as well. Beyond Compare can compare a local directory and a remote directory via FTP. Very handy when moving files to remote servers!

Whether you use one of the many freely available utilities or purchase one of the more advanced applications a diff tool is essential in any developers toolbox.

Using Beyond Compare In CFEclipse

Posted October 31st, 2007. Filed under Code

My favorite diff tool (and it does so much more) for a long time has been Beyond Compare.

When I started using SVN and Eclipse – I looked for a way to integrate Beyond Compare into the mix so I could use it to compare my working copy against the repository. I found Beyond CVS – but unfortunately it only supported CVS. :( There were a few comments on there asking for SVN support and I added one myself and promptly forgot about it.

Well a few days ago I got an email from the plugin author informing me he had finally updated things and added support for SVN!!! Woot!

To install – simply download the ZIP (make sure you grab the one with SVN support!), extract the ZIP and copy the /features and /plugins directories to your existing Eclipse directory.

Crank up CFEclipse and you should have some shiney buttons as well as some additional options in your right click menu when you go to compare a file:

Beyond Compare

Update: Looks like the new 0.8.x version requires Eclipse 3.4.