8

I'm using Eclipse 3.4 (on Mac) and I've got an annoyance with the text comparison having the files I'm comparing in a specific order which is not what I want.

When I compare two files it always seems to put the first file (alphabetically) on the left, and the latter one on the right, but I want to be able to change this on a comparison by comparison basis.
IE comparing 'file-a' and 'file-b' will always have 'file-a' on the left, but that isn't always what I want. I seem to recall in earlier versions of Eclipse that changing the file that was right-clicked when choosing Compare With -> Each Other changed the order, but that isn't working for me in 3.4.

An example of why I care:
I've just performed a subversion merge and had a conflict, so I now have the following files:
file
file.merge-left
file.merge-right
file.working

I've made changes to file and now want to compare file to file.merge-right and file.working to file.merge-left and split the editors so I can have the working/left changes sitting above the file/right changes, and then just page through the compare editors and make sure the differences between this file and the file that the merge comes from have been preserved, but file is on the left while file.working is on the right, and hence the differences need to be compared diagonally rather than just comparing top and bottom.

Craig Angus
  • 21,343
  • 17
  • 53
  • 62
Cebjyre
  • 6,404
  • 3
  • 28
  • 57

3 Answers3

5

Yes, that's actually very annoying. We use an external tool called Beyond Compare (we have a corporate licence) which can swap the two sides easily.

What you should probably do is raise an enhancement request on the relevant Eclipse team with Bugzilla. If there's enough demand, it'll either make it into the next release or someone will write a new (or modify the existing) plug-in to allow swaps.

paxdiablo
  • 772,407
  • 210
  • 1,477
  • 1,841
1

As I mentioned here, Eclipse Neon.2 (4.6.2) has a button to swap the views:

enter image description here

Community
  • 1
  • 1
Emerson Dallagnol
  • 1,279
  • 1
  • 13
  • 21
1

There's a "Swap From and To" button when the Compare screen comes up. Using Eclipse 3.6. I'm actually looking for a way to change default behavior. For example, when I compare revisions, it always have the latest revision on the left side instead of right unless I click the swap button before comparing.

Cory
  • 11
  • 1
  • 2
    I won't upvote because it's not answering the OP's question, but I have the same problem with Eclipse. Timelines always show the old stuff on the left, and the compare screen should too. – Greg Dec 14 '11 at 17:03
  • The same issue here - presenting changed file on the left pane is very user unfriendly. I would love to know where this can be changed. – sax Jun 25 '12 at 13:19
  • 3
    One more note to my previous comment - you can vote for the Eclipse change here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=213780 – sax Jun 25 '12 at 13:35
  • I could not find the "Swap from and to" button in Eclipse Juno. Is it still there? – Dikla Jun 27 '13 at 06:58