Firefox 3 Tips and Hidden Features

Percy Cabello has a good post on Mozilla Links outlining some of the lesser known features that made it into Firefox 3. My personal fav is the duplicate tabs tip. “Duplicate tabs. Press Ctrl (Cmd on Mac) while dragging a tab to create a duplicate of the dragged tab including its history.” Excellent tips!

*****

Setting up Eclipse: Ganymede Edition

It’s that time of the year again… The Eclipse community makes us regular schmucks look like slobs by not only delivering a single project feature-complete and on time, but twenty three (Hopefully my project manager doesn’t ever hear about this!). Overall I am very impressed with the Ganymede release. I really like the breadcrumb navigator in the Java Editor and everything seems more polished and stable than in my old Europa install. The only problem I had was with the Subversive svn plugin. I understand that they were having licensing issues with Polarion (the company behind subversive), but if that is the case, they shouldn’t have shipped it as part of Ganymede at all. For those of you whom haven’t tried this out yet, there are two plugins you need to get subversion support in Eclipse, the Subversive Plugin and the SVN Connectors. You can’t get the Connectors plugin directly from Eclipse though, which makes the Subversive Plugin bomb out when you try to connect to a repository (but appear to work fine otherwise). To get a working svn client in Eclipse you will need to add the Polarion update sites for the client and connectors to your update manager [http://www.polarion.org/index.php?page=download&project=subversive].

I’ve spent a bit of time this weekend setting up Eclipse to behave the way I like. The following is what I generally do to a new Eclipse installation… feel free to leave any customization tips you may have in the comments ;-)

Key Bindings
The first thing I always do is switch the key-binding settings over to Emacs mode (General -> Keys -> Scheme: Emacs). Even if you don’t use Emacs, you should use these key-bindings. The main benefit you’ll get is in-file navigation (Ctrl+P, Ctrl+N, Ctrl+F, Ctrl+B for moving up, down, right, and left respectively). Not only that, but you will also be able to perform in-file searches as well (Ctrl+S and Ctrl+R for incremental and reverse-incremental). Many of your java-specific key-bindings remain the same such as Ctrl+Shift+O for organizing imports and Ctrl+Shift+T for opening class files. The only weird part is the keys for code suggestions changed from Ctrl+Space to Alt+/. It is well worth it to learn these keys and make the switch. You will spend little in effort for lots of gain in productivity.

Code Formatters
This is still a problem in Ganymede… I hate that I have to specify my tab policy in each formatter instead of having a set of global formatters for everything. I like having spaces vs tabs in my source code. Yet still I have to create a separate new profile for Java, JavaScript, CSS, HTML, XML, Ant, etc… It would be nice to have one place to say: I want to use spaces only, restrict code to 80 chars wide, put else blocks on a new line, etc… To change this, it is easiest to do a search in the Preferences menu for “format” and then setup each individual formatter/editor to your liking.

Save Actions
One of my personal favorite things about Eclipse is Save Actions. You can set your Java Editor up so that it performs a list of actions whenever you save a file. For example, I have my editor setup to format the source code, add the ‘this’ qualifier to field accesses, organize imports, remove unused imports, add @Override and @Deprecated annotations, and to remove trailing whitespace. This saves me lots of time and helps me write code the way I truly want to (instead of allowing me to be lazy). Once of the cool features of Ganymede is that you now have the option to only format edited lines. This is helpful when you are working on code from CVS or Subversion and somebody else may not have formatted their code like yours.

Code Templates
Under Java -> Code Style -> Code Templates you can setup how you want your comments and code laid out for you. For example, you can put a standard licensing message at the top of every new file or stamp each type with the date and time it was created. Very handy stuff and almost anything is better than the defaults, so make sure you go through here and set these up how you like them.

Then it is off to work. Happy Hacking!

*****

Putting Google Maps on your site with ExtJs

Shea Frederick has a post on the ExtJs blog on how to integrate Google Maps with your ExtJs application. Very cool stuff. I can’t wait to see mapping play a bigger and bigger part on websites. You can go directly to the demo or check out the code to see how easy it is to put a map into your app.

*****

What is OSGi for?

Neil Bartlett explained exactly what OSGi is good for on his blog this weekend. This was in response to Chris Adamson’s article on java.net admitting that despite all of the OSGi news lately, he still didn’t know what he would ever use it for. [Fundamentally, OSGi is a module system that allows you to define dependencies between jar files… and much more.] You can find a good newbie explaination of OSGi on TheServerSide.com and further information in Neil’s free book OSGi in Practice.

*****

Embedding NASA World Wind in an Eclipse Application

Vladimir Silva has written an article for IBM DeveloperWorks outlining how to embed NASA World Wind into an Eclipse RCP or Plugin project. For those of you whom haven’t heard, NASA World Wind is basically an embeddable, open source version of Google Earth. It uses JOGL (Java OpenGL Bindings) to display map data on a 3D globe. Very cool stuff!

*****

Top Five Sessions from JavaOne 2008

James Sugrue has posted his Top Five Sessions from JavaOne 2008 over at JavaLobby. You can check out some of the other sessions on Sun’s website and see if you agree.

*****

Seven Aspects of a Great User Experience

Lana Kovacevic has a post on Builder.au enumerating Andy Budd’s seven aspects of a great user experience. Andy does a good job relating each principle to a real-world experience. Nothing really unexpected, but a good read nonetheless.

*****

YUI 2.5.2 Released

Yahoo! has released YUI version 2.5.2. This is a bug-fix release that adds support for the upcoming Firefox 3 and Opera 9.5 browser updates. There are fixes for better Adobe AIR support as well. Be sure to check out the release notes and then grab it from the YUI page.

*****

Adobe News

It looks like Adobe is finally going to start treating us Linux users like first class citizens with the next release of Flash, version 10. Not only will the next version be released simultaneously on the Windows, Mac, and Linux platforms (pre-release available now), it will also contain some kick ass new features such as 3D Effects, new text layout effects, and better support for video playback.

Another big announcement from Adobe was their Open Screen project. While they are not moving to a true open source license, they are publishing the specification for SWF and removing the licensing fees for the Adobe Flash Player and Adobe AIR.

This is good news for me. I’ve had my eye on Adobe AIR for a bit now and have been itching to try it out. With Linux support and a (more) open platform, they have addressed many of the initial concerns I had with the framework. Now I can make shiny widgets like everyone else ;-)

*****

Spring Releases

The Spring community has been busy over the last month coming out with a slew of new releases. Spring Web Flow 2 has been released with better support for JavaServer Faces and JavaScript. For those of you whom haven’t heard of Web Flow, it is a continuations framework that allows you to write flows for your web  application. For example, think of the page flow of a user performing a search on your site and then interacting with the results. After running the search, the user may follow a result link or they may click the back button on their browser to refine their search. Web Flow helps you define the valid paths a user can take through the pages and helps manage state between these pages. Ajaxian has a writeup on the new JavaScript support and InfoQ has an interview with Keith Donald and Jeremy Grelle regarding the release.

In other Spring related news, the SpringSource Application Platform has been released. This is an OSGi-based application server that promises to allow you to update your application in real-time on the server. For more information on this, check out the discussion on TheServerSide.com as well as this interview with Spring creator Rod Johnson on dZone.

*****