Tobi
Tobi

Reputation: 999

Comparing files between 2 workspaces in Eclipse

I've got two different workspaces for two different projects I'm working on, however some of the code I checked out is from the same package spread across the two workspaces...and I have a feeling I've changed different parts of the packages across the two workspaces

Is there anyway to use the "Compare With" feature of Eclipse across the two workspaces? The only way I've found is to take the file, rename them, put them in the same director, refresh, and then select the two files and compare with...is there something better/easier?

Upvotes: 0

Views: 5494

Answers (3)

Satya
Satya

Reputation: 8356

INFO:

If you want to compare two file, you can use any external comparing editors other than Eclipse compare. Ex : Beyond Compare Editor.

Upvotes: 0

home
home

Reputation: 12538

Something better:

If you work with (and modify) the same source code base in different workspaces, I'd rather create one workspace containing both projects as well as the shared code. Then use working sets to switch between your different projects. In my opinion everything else is a recipe for disaster. Using this approach you can easily use eclipse's built-in compare features.

Upvotes: 2

Sascha
Sascha

Reputation: 127

i really like the AnyEdit Plugin (http://andrei.gmxhome.de/anyedit/). It provides some adittional "Compare With" Functions:

  • Compare / Replace with Clipboard Editors, Navigator, Project Explorer If some text is selected in editor, then only this selection will be compared, otherwise entire editor

  • Compare / Replace with Workspace File... Editors, Navigator, Project Explorer If some text is selected in editor, then only this selection will be compared, otherwise entire editor

  • Compare / Replace with External File... Editors, Navigator, Project Explorer If some text is selected in editor, then only this selection will be compared, otherwise entire editor

  • Compare / Replace with Opened Editor...

Works very good to me.

Upvotes: 6

Related Questions