Home > Apex, Visualforce > Comparing Code

Comparing Code

June 23rd, 2009

Today I discovered a neat little feature in Eclipse that allows you to compare two files and identify the differences. With multiple sandboxes, production, and developer environments I often have multiple versions of a class or Visualforce page in many different places and I lose track of minor changes. Yes, I should be using some type of real version control system but I am the only developer and so far there haven’t been any issues. I also get the vibe this is the way a lot of orgs are developing on Force.com, wild wild west style.

To compare two files in Eclipse simply hold CTRL while selecting the files, right click on one of them, Compare With, and then select Each Other. This will load a screen that allows you to easily identify the differences between the two files. This works for everything including triggers, classes, pages, objects, etc.

For the Eclipse gurus the response may be, “uh, duh”, but a lot of people developing on the Force.com platform may be new to Eclipse (myself included) and this is a great little feature.

Categories: Apex, Visualforce
  1. March 17th, 2010 at 11:42 | #1

    awesomeness.