Tag Archives: team

Eclipse's Quick Diff: See What Changes You've Made Since Last Checkout

A new morning. You’ve checked out the last code from SVN. Stand up and prepare a coffee and when you were back to the computer, Eclipse had loaded the newest code. You ready to code. And you code. Until afternoon and you need to check-in the changes you’ve made. Now you wonder, what have you changed? You know the file you’ve changed, it’s decorated by Eclipse after all. But which lines?

This question is always arisen to most of us. Unfortunately, as default, Eclipse didn’t easily show which lines have you added since last check out. Before I know this feature, I usually compare my code with the latest code in repository. How annoying is that?

It turns out that Eclipse actually already have functionality for that. See this picture.

This feature is called Quick Diff. It is turned on as default but the reference source is the last saved version. If your project use SVN (or CVS, Mercurial, Git as long as you use the Eclipse plugin for that SCM), you can change the Quick Diff behavior to compare the code on your machine with the latest code in the SCM. How nice is that? If you delete lines, you’ll get something like this.

How to do that? As you can guess, go to Preferences and select General → Editors → Text Editors → Quick Diff. Then change the last combo box to SCM you used. That’s it. Now close the main screen and close all opened files. You’ll get the information about which lines have you changed once you open any files.

There is another option in the preference to ‘Show differences in overview ruler’. If you activate this, you’ll get something like in on the right side of the editor.

Now there is still problem with this quick diff functionality. If you have several projects that come from different SCMs, you can’t set the source project based. It’s so not nice and I have filed a enhancement request for that. Vote it up if you also want that functionality!

Eclipse's Team Project Set: Easier Collaboration

Eclipse has this feature Team Project Set which is rarely used. Really rarely I must say.

The point of Team Project Set is when you have many projects on your workspace that build the entire application. People often ask new developers to just check out each project from CVS/SVN. While this works, it is certainly not efficient. With Team Project Set, you will get the same result just by several mouse clicks.

To use Team Project Set, first you have to have a workspace fully configured for your application. Now, click anywhere the Package View and select Export. Select Team Project Set from the list. You should get this dialog window.

Now select the projects you want to include in the Team Project Set and click Next. Select the target file and click finish. Your job is done. Now you can share the project set file to the new developers.

In the new workspace, you can do the reversed step that you do before. Do Import and select Team Project Set.

The next step is self-explanatory, select the project set file you’ve created before and click finish. Depends on the size of your projects, the process will take time anywhere from couple of seconds until several hours. And there you go, the complete projects of your application configured with the SCM.