Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to switch the order of files (original and modified) in Eclipse Compare window?

Tags:

diff

eclipse

When comparing two files, for example during a commit, Eclipse shows the original version on the right and modified on the left:

Compare Window Screenshot

However, I would prefer to see the original version on the left and modified on the right. Is it possible?

like image 586
vitaut Avatar asked Feb 18 '12 11:02

vitaut


People also ask

How do I view modified files in eclipse?

In the Eclipse Navigator view (or any Eclipse view that supports Team operations), right-click the file or folder and click Team > Show History.

How do I compare two EAR files in eclipse?

To compare two files in Eclipse, first select them in the Project Explorer / Package Explorer / Navigator with control-click. Now right-click on one of the files, and the following context menu will appear. Select Compare With / Each Other.

How do I open a previous file in eclipse?

Eclipse shows recently opened file in topmost section and other files in the lower section. You can also use Ctrl + Q to goto last edit location.


2 Answers

Eclipse Neon.2 (4.6.2) has a button to swap the views:

enter image description here

like image 191
Emerson Dallagnol Avatar answered Sep 28 '22 11:09

Emerson Dallagnol


  1. You can either swap the views for every compare, as one answer suggests:

    button to swap compare order

  2. Or you can make the swapped order be the default for all compares:

    Windows --> Preferences --> General --> Compare/Patch

    Select the Text Compare tab, and mark the check-box of Swap left and right

    Compare/Patch -> Text Compare -> Swap left and right

like image 42
Michael Veksler Avatar answered Sep 28 '22 10:09

Michael Veksler