Subclipse - marking code changes like in NetBeans
Asked Answered
P

5

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?

Pileup answered 8/2, 2010 at 7:24 Comment(0)
A
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.

Amandy answered 8/2, 2010 at 7:40 Comment(3)
That's what I was looking for :). Thank you! I'll add some comment to yours answer :) - On QuickDiff pane in "Use the reference source" combo there should be selected "Pristine SVN Copy".Pileup
I was looking the same. Thanks! In my case, I need to close and re open the files to see the changes (no need to restart eclipse)Nabila
Note that Eclipse must know your SVN repository for this to work. If you're coding in a working copy that works perfectly from command line but your project is not related to an Eclipse's SVN Repository, the code changes will be erased as long as you save the file. It will not compare to the last commited version. (Using Eclipse Luna 4.4.2 + Subversive)Zecchino
A
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

Aragon answered 8/2, 2010 at 7:37 Comment(0)
T
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.

Tasia answered 8/2, 2010 at 7:29 Comment(0)
D
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)

Dramatize answered 8/2, 2010 at 7:29 Comment(2)
Yes it does but I would like to see changes in editor view, so I can see what line of code I've changed. So how can I do this?Pileup
Ah, ok. I've added a bit more to my answer.Dramatize
C
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.

Concerted answered 18/5, 2011 at 21:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.