vitaut
vitaut

Reputation: 55755

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

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?

Upvotes: 18

Views: 1228

Answers (4)

Michael Veksler
Michael Veksler

Reputation: 8475

  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

Upvotes: 1

Emerson Dallagnol
Emerson Dallagnol

Reputation: 1269

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

enter image description here

Upvotes: 4

Johannes Dicks
Johannes Dicks

Reputation: 51

This behaviour is influenced by what exactly is compared. When comparing two local files the view is influenced by the first & second selection. If using e.g. GIT the left hand side will always be what is present locally, the currently checked-out branch or local changes - so changing the branch will influence the view. When using SVN it is mostly the same, so left hand locally, right hand remotly.

Upvotes: 0

Loutch
Loutch

Reputation: 1

I think it's just depending of which file you're selecting first. I mean, choose a file, and select compare to .. and choose another one. Next choose the second one and compare to the first one, they'll swap in your window :)

Upvotes: 0

Related Questions