This is a quick tip how to use the convenient built-in Eclipse file comparison tool in DDE.
Some of us have multiple applications that share the same or similar structure with different data. Then you decide to update a custom control in one application. Weeks go by, then you realize that it would be nice to update the corresponding custom control in the other application. however, You are not sure whether you can just blindly copy over the custom control from one application to the other, because you might have changed something in the other application some time ago that you long forgot about. I am sure, I am not the only developer with these kind of niggling problems. If you are one of these devs, then read on; the built-in file comparison is a great tool for you.
File local history comparison
If you want to check one particular XPage or custom control or any other component in your application, right click on the component and select Compare With > Local History
You will notice the History Eclipse View opening on the right side:
If you double-click on the date that you want to compare your present component with, the comparison window opens up.
On the left side, you see the component in the present, on the right the local history version.
The little toolbox on the top right helps you navigating and copying the differences between the two different instances. The actions of the buttons are self-explanatory:
Comparison of two components in the same application
You can select the two components that you want to compare by clicking on the first on in the Applications view of DDE, then control-click on the second component. Then right-click on one of them and select Compare With > Each Other
If you are adventurous enough, you can compare even 3 files, but you’ll have to work the logistics of that yourself.
Comparison of two components from two different applications
The above example does not work if you want to compare two components from two different applications. You need to open the two projects in Package Explorer or Navigator Eclipse view. Then you can select the two components by clicking on the first one, then control-clicking on the second one.
I hope this quick tip will help you in your dev work-flow.