Saturday, August 7, 2010

JDT 3.7 M1 - New and Noteworthy

Filter preferences on Java > Compiler > Errors/Warnings page

We have just too many options on this preference page (as does PDE and API tooling on some of their preference pages) and finding the option you are looking for can be quite difficult (and frustrating) with all the twisties and so much of scrolling involved.

You can now filter preferences on the Java > Compiler > Errors/Warnings page by preference label text or by preference value. A word in the filter string preceded by '~' is used to filter on preference values. Examples:
  • param
  • ~off
  • ~ignore
  • param ~enabled
  • ~ignore param

Bug 321818 is the next item to do - allow to filter a section for a value e.g. 'code style ~error.

New 'Open Hyperlink' command

The new Open Hyperlink command opens one or more hyperlinks at the current caret location. The command has been added to the Navigate menu for the Java and properties file editors and can also be used in other text editors by assigning a key binding on the General > Keys preference page.

The command opens the hyperlink directly if there's only one link available. Otherwise, it shows a chooser with all the available hyperlinks at that location. The links are the same as when you move the mouse with Ctrl pressed.
So now you can assign a key to this command (say F6) and then use this command in Properties files to navigate to NLS key references, in Java editor to navigate to declaration or implementation for a method,and declaration for other Java elements, or for any other hyperlinks.

In short you can possibly stop using Open Declaration (F3) and start using this new command - depending on whether or not you would like to always make a choice between navigating to declaration or navigating to implementation for method invocations :)

Other New and Noteworthy items.

Sunday, August 1, 2010

CVS vs Git: Local disk usage

I was a bit skeptical about the local disk usage with Git, as every Git clone is a full-fledged repository with complete history, and apparently Git stores entire snapshots and not the deltas.

Everyone seemed to be claiming that Git is quite efficient in terms of storage space required, and I also found the following statistic on the web
"The Mozilla CVS repository was 2.7GB, imported to Subversion it grew to 8.2GB. Under Git, it shrunk to 450MB. Given that a Mozilla checkout is around 350MB, its fairly nice to have the whole project history (from 1998) in only slightly more space."

But I was still a bit skeptical... :)

So I downloaded some of the JDT source from Eclipse Git repositories and compared the disk usage under Git with CVS. Here are the numbers. For these selected projects, Git on an average takes less than three times the space required by CVS. In my opinion this cost is nothing as compared to the benefits of having the entire history locally.