We all have our favourite diff tools for comparing files and it’s probably not Eclipse itself, unless you’re comparing version controlled files.
But sometimes you’ll want to compare two files from within Eclipse (whether they are in your workspace or external files) either because it’s quicker or you don’t have your own diff tool to hand.
Eclipse offers two ways of comparing files with each other. One of them is appropriately called Compare with Each Other. Although this is often the suggested way to compare files, it’s not easy to use and doesn’t work with external files. This post will focus on another Eclipse feature called Compare with Other Resource that makes things go a bit smoother and handles external files but it will also cover using Compare with Each Other.