Eclipse text comparison order
Asked Answered
P

3

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.

Pleasurable answered 19/9, 2008 at 5:13 Comment(0)
C
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.

Curb answered 19/9, 2008 at 6:11 Comment(0)
E
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.

Enterovirus answered 28/4, 2011 at 13:23 Comment(4)
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.Denazify
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.Hospitalet
One more note to my previous comment - you can vote for the Eclipse change here: bugs.eclipse.org/bugs/show_bug.cgi?id=213780Hospitalet
I could not find the "Swap from and to" button in Eclipse Juno. Is it still there?Ichthyosaur
M
1

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

enter image description here

Misplay answered 6/2, 2017 at 11:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.