Friday, July 11, 2008

Eclipse Tip: Static Imports

One of the great features of Java 1.5 is Static Imports. In order to configure Eclipse to search for static imports in a particular class, you have to perform the following steps:

  1. Navigate to Preferences by clicking on the Window -> Preferences Menu Item
  2. Navigate to Java -> Editor -> Content Assist -> Favorites using the menu tree (or search for Favorites using the search bar at the top)
  3. Click the New Type button
  4. Type in the name of the Class that has static methods that you would like to be used when using Eclipse's Content Assist / Code Completion (eg Assert)
  5. Click on the Browse button which will bring up the Open Type Dialog using what you entered previously as the search criteria
  6. Find the class that you would like to add, and then click Okay on the Open Type Dialog
  7. Then Click Okay on the New Type Favorite Dialog.
Now when you are editing Java code, instead of typing Assert.assertEquals, you only need to type assertEquals, with Ctrl-Space, and the Assert Type will be searched for in order to resolve the static import.

If this helps, pay it forward....

Friday, July 4, 2008

Goodbye P2, Welcome Back Update Manager

Well, I gave it a good go. I tried my best to wrap my arms and my head around P2. It wasn't until I read this blog, that I finally understood how to get P2 to work the way that I wanted it to work - complete with bundle pooling. However, I felt that there were just too many steps necessary in order to get it up and running in that fashion. Combine that with the limited documentation, I have reverted Ganymede to use the old Update Manager using these instructions.

I still do believe that P2 is a step in the right direction, however the learning curve is just too steep for me at this point. I hope to see improvement in P2's user experience in the future, at which time, I will give it another try.