Subclipse - marking code changes like in NetBeans

人走茶凉 提交于 2019-11-27 10:33:15

问题


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?


回答1:


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).

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.




回答2:


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:

Team -> Show Annotations option on a file




回答3:


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.




回答4:


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.




回答5:


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).


(source: tigris.org)



来源:https://stackoverflow.com/questions/2220111/subclipse-marking-code-changes-like-in-netbeans

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!