22

I moved recently from NetBeans to Eclipse. Since I have to work with the project checked out from SVN I installed Eclipse. My question is: how to make Subclipse indicated the changes that I introduce in the source code (downloaded from SVN) just like NetBeans? Is there any way?

4

5 回答 5

55

In Window -> Preferences navigate to General -> Editors -> Text Editors -> Quick Diff and tick "Enable quick diff", "Show differences in overview ruler" and set "Use this reference source" to "Pristine SVN Copy".

You might also want to change the colors to match NetBeans (blue for Changes, green for Additions, red for Deletions).

enter image description here

Note that you'll probably need to restart Eclipse for this to take effect.

As you go on changing the code it will show your changes on the side ruler until you commit to SVN.

于 2010-02-08T07:40:32.273 回答
6

If you are referring to the Viewing Changes in the Source Editor section of subversion in Netbeans:

alt text http://netbeans.org/images_www/articles/60/ide/vcs/left-ui.png

Then it should be like activating the Quick diff Annotate in Subclipse:

alt text

Team -> Show Annotations option on a file

于 2010-02-08T07:37:37.850 回答
1

Subclipse automatically keeps track the changes that you do in Eclipse.

If you would like to see the changes, the convention in Eclipse is to go to Team -> Synchronize menu on the project.

于 2010-02-08T07:29:13.680 回答
1

Doesn't subclipse mark the classes and packages in the Package Explorer as being different to the version checked-in to SVN?

EDIT

You can use the compare function to see the differences. One way to do this is to open the synchronize view, right click on the desired class and choose compare (i can't remember the exact menu option, but it's something like that).

alt text
(source: tigris.org)

于 2010-02-08T07:29:21.730 回答
1

If you want to quickly compare changes from a single file, right click on it select 'Compare With' -> 'Latest from Repository'. The resulting diff would look much like the one in Binary Nerd's first screenshot, only it will appear in Editor section and you won't have to switch perspectives.

于 2011-05-18T21:10:59.480 回答