Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using eclipse comparator from command line

Can Eclipse Compare tool be called from command line? I just want to use it as a merge tool from an external tool.

like image 981
Rafa de Castro Avatar asked Oct 02 '09 09:10

Rafa de Castro


People also ask

How do I compare codes 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 compare two projects in STS?

To use Compare with Each Other, open the Package Explorer (or similar view) and select the source file. Then hold down Ctrl while you navigate to the other file in the same view. Then select the other file and release Ctrl.


2 Answers

I'm not aware that you can do this out of the box. But you can download the RCP SDK and create a really stripped down version of Eclipse which contains just the compare plugin. That will also help greatly with the startup time.

like image 159
Aaron Digulla Avatar answered Oct 20 '22 19:10

Aaron Digulla


Any reason you insist on Eclipse for that? I've used WinMerge for exactly the same purpose (external diff tool). It has built in ability to be called from command-line.

Other options: https://stackoverflow.com/questions/792910/best-graphical-source-code-diff-viewer-editor-for-code-comparison-and-merging

like image 36
Yasei No Umi Avatar answered Oct 20 '22 18:10

Yasei No Umi