kannanrbk
kannanrbk

Reputation: 7134

How to use external diff viewers in eclipse? Is there any diff viewer available for eclipse inbuilt?

enter image description here

I am working on a java project in eclipse . Every time commit a file i want to view what are all the changes have done in this file . In eclipse its hard to analyze which lines are removed , added , changed etc . Please give your suggestions on this .

Upvotes: 10

Views: 18015

Answers (4)

fl0w
fl0w

Reputation: 3877

I landed here because I was looking for a way to merge in an external merge editor (KDIFF3) but start the merge from eclipse. I wasn't satisfied with the answers provided above. So here is ho to configure kdiff3 as merge and diff editor for SVN in eclipse:

go to Windows -> Preferences → Team -> SVN -> Diff Viewer Add a new config (add button): Extension or mimetype: * - if you wish you can specify different mimetypes for different editors, I didn't need that thus the alquantor.

Diff: Program path C:\Program Files\KDiff3\kdiff3.exe (or wherever you have your merge editor - sry for the windows path, feel free to add a linux version in the comments or edit this answer.)

Arguments: ${base} ${mine} ${theirs}

Merge: Program path C:\Program Files\KDiff3\kdiff3.exe

Arguments:

${base} ${mine} ${theirs} -o ${merged}

This will probably work as well for other merge editors, but with a different argument syntax (figure it out an let us know :) ).

The usage is as usual (team->edit conflicts) for merging and compare->foo for the diff view.

Cheers

Upvotes: 4

Line
Line

Reputation: 1651

Also, if someone doesn't have to call it indirectly from Eclipse (for example I just don't like to install additional packages such as externaldiff from Mohamed Jameel answer on my Linuxes), you may try call external diff viewer from SVN.

On Linux this article was very helpful for me: SVN: how to compare working copy with repository revision?.

Upvotes: 0

E-Riz
E-Riz

Reputation: 32914

You don't say what version control system you're using, but most of them (cvs, svn, git, and perforce, that I know of) implement the Team > Synchronize functionality. The Synchronize perspective provides a preview of both outgoing and incoming changes; you can easily see what has changed that you need to commit side-by-side with what has changed in the repository that you have yet to receive. Right-click a project (or any other selection of version-controlled resources) and select Team > Synchronize. It's virtually identical to what you show from Netbeans.

You can also use the Compare With menu and/or whatever options are presented by your version control system under the Team menu for individual files.

The colors in the compare view can be customized to your liking, via Preferences > General > Appearance > Colors and Fonts (look for Text Compare in the tree).

For Mercurial, the MercurialEclipse plugin implements this Synchronize view.

Upvotes: 4

Mohamed Jameel
Mohamed Jameel

Reputation: 602

actually eclipse have inbuilt compare tool. if u need compare with any other app, try this plugin

http://sourceforge.net/projects/externaldiff/

Upvotes: 2

Related Questions