Jan 09
When working with Eclipse I usually have multiple workspaces I am are working with (different projects, clients, branches, …). I found a useful command line argument that displays the path of the current workspace in the window tittle bar - showlocation. Just add it to your eclipse.ini file, mine looks like this:
-showlocation
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m
-Dcom.sun.management.jmxremote
I noticed that showlocation only works when added as the first argument.
Dec 27
Just before Christmas Mylyn 2.2 was released. Although it is just a small change in the version number this version comes with a lot cool new features as you can see on their new and noteworthy page.
These are my favorite ones:
- Create Task from JUnit Failure - with a simple mouse click you can create a task for a failing unit test
- Create Task from Text Selection - if somebody wrote two ore more tasks in one entry you can split them up very easy
- Improved Notification Popup - with more detailed information about what changed
- Screenshot utility -allows you to attach a screenshot to a bug without having to use additional software
So if you are using Mylyn already go for the update - if you are not using it try it! I have to say that starting to use Mylyn this years was a big improvement for staying focused on the most important task.
Dec 12
I tried to create JUnit tests for a Spring based project which I upgraded to the newest Spring version 2.5. The project is developed in Eclipse and I already got the JUnit4 library included in my Java Project:

To benefit from Spring JUnit support I had to add the following annotation to my test:
@RunWith(SpringJUnit4ClassRunner.class)
This caused a compilation error saying that the class org.junit.internal.runners.JUnit4ClassRunner was not found in my classpath but is needed internally from one of my imported classes (in my case SpringJUnit4ClassRunner)
I found out that JUnit 4.4 is needed to compile these new kind of Spring JUnit tests but the JUnit version bundled with Eclipse 3.3.x is 4.3:

As this post states JUnit 4.4 will be included in the next milestone of Eclispe 3.4 - meanwhile I have to add it to my libraries manually.
Nov 08
I did never really bother about what fonts to use for programming. The default of the the IDE was fine for me. Then I came across this article of Coding Horror about a month ago. One sentence in the conclusion of it made me think:
Please don’t use the default Courier New typeface. Be kind to your eyes.
So I took a closer look on what ClearType really means. This wikipedia article and the Microsoft page about ClearType helped a lot. I had ClearType activated on my Windows XP a very long time but I never cared if a font is designed for ClearType or not. There is a tool from Microsoft (the ClearType Tuner in PowerToys) that allows to configure ClearType exactly for your display - it improved my screen a lot.
After knowing the “plus” of ClearType I downloaded and installed the special fonts pack from Microsoft. It changes the default font in Visual Studio 2005 do Consolas which is special ClearType font. As you can see in the screenshots below it looks really bad when used without ClearType activated:

When ClearType is activated it looks like that:

I changed the font settings in my favorite IDE Eclipse to Consolas too and I am very happy with it. It is a subjective impression but I thinks it is better to my eyes
Compare it to Courier (which is the default font in Eclipse) with ClearType activated:

or Courier without ClearType:

There is a difference.
Fortunately there is a font called Inconsolata that is free and is very similar to Consolas which is perfect for programming under Linux.
Oct 09
Today I upgraded my Eclipse installation to the current stable version 3.3.1. I did this because this version contains a fix for a bug that caused me some problems in the last few months. The CVS command “Switch to Another Branch of Version” did not work as expected. It always left a sticky tag on changed files - see this bug entry. In versions before 3.3 this worked and it is fixed again with 3.3.1 and 3.4M1.
After installing the new version 3.3.1 I had to experience the dreaded OutOfMemory PermGen size error again. I checked the eclipse.ini configuration file but it looks like the one of version 3.3. After doing some search I found the following bug entry. Seems like the launcher.XXMaxPermSize configuration directive does not work in this version.
I adapted my eclipse.ini file to
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Xms40m
-Xmx256m
-XX:MaxPermSize=256m
and now the MaxPermSize counts again.
Jun 29
Today Eclipse Europa was released. Eclipse Europa is the name for Eclipse IDE 3.3 and a set of other compatible Eclipse projects. With last years release Callisto the Eclipse team tried to make it easier for users to find the right plugin versions for their Eclipse installation. The Callisto update site allowed to install many other projects from eclipse.org (WTP, VE, BIRT, …). This was a great improvement.
With Europe they went one step further. When downloading Eclipse the user may choose from five different base packages:

I downloaded version for Java EE Developers from a German mirror, unzipped it and had the complete environment with WTP 2.0 up and running. In former versions I always had to install WTP manually through the update wizard or by downloading the required packages.
Before I started Eclipse I looked into the eclipse.ini file and was very happy - the default memory settings for the VM in which Eclipse runs is set to 512 megs and the MaxPermSize setting is there to. In earlier versions you had to add the setting if you are using Sun JDK (see earlier posts).
So much for the version released today. I am using Eclipse 3.3 milestone and release candidate versions now for about two months and here is a list of which of the things I like most:
- Save Actions
This is definitive one of my favorites. When working in large teams with repositories it is essential to have a common code formatter to avoid checkin’s of format differences. I made it to a habit of mine pressing always Ctrl-Shift-F before saving a file but it happens that team members forget to not do this. Save Actions allow to configure which things are done automatically when saving a file - I think formatting and organizing imports is a must (minimizes warnings too).
- Clean Up profile
With Eclipse 3.3 it is possible to define profiles for the clean up action like you can do for the code style formatter. This allows you do define team wide settings for code clean ups. Again this minimizes differences between checked in code of team members.
- Improved compare view
Another great improvement that safes time when working with CVS repositories: when comparing differences between files the compare view shows which symbols changed in a line. This makes it much easier to find out what the real changes in a file are.
- Easy way to stop console from popping up
Sometimes it is really annoying that the console always pops up when something is written to the standard or error out. Now two small buttons allow to switch these behavior off and on - nice!

I could continue with this list and maybe I will in one of my next posts. There are so many other things like improved library handling in WTP, Ant 1.7 with support for JUnit 4 and so on.
The only bad experiences I had so far were:
- Spell checking for extreme large XML files does decrease productivity. I turned it off.
- Checking the option for generating a serial version ID in the clean up dialog prevents the clean up run from coming to an end.
- I had problems with installing Subclipse because a required feature is missing in the Java EE package.
All in all I can not wait for doing my projects with this shiny new version of Eclipse - thanks to the Eclipse team!
Jun 12
I am using Eclipse WTP now for about two years and I am very satisfied with its features. But the version 1.5.2 which I used over the last year still has some problems.
Yesterday I migrated an old application that was tested with the Sysdeo Tomcat plugin to WTP by making a Dynamic Web Project and moving the source folder inside the CVS repository. Everything worked fine except the fact that every time I started the Tomcat test server the application was loaded twice.
I found out that the reason for this behavior was that I renamed the Context Root under Web Project Settings in the project properties dialog.
To be able to access the application under a different name than the project name you have to rename deploy-name inside the org.eclipse.wst.common.component file too. With WTP 2.0 and Eclipse 3.3 RC3 it is enough to rename the Context Root.
May 31
Only 30 days to go until the annual Eclipse release. This year the release is called “Europa” (last year it was Callisto) and includes 22 projects. There is a wiki page that provides more information about the status of “Europe” and you can already try it by downloading Eclipse 3.3 RC2 and installing “Europe” over its official update site: http://download.eclipse.org/releases/europa/site.xml
I am already working with Eclipse 3.3 RC1 and WTP 2.0 and I am quite happy with the new features and I hope they are able to eliminate the small bugs that can be found in this version.
May 10
I am participating the first time in a group writing project Darren Rowse started. The topic is “Top 5″ and I thought about a lot of personal top five lists but finally came to this one.
Every worker wants to get the most usage out of his tool. In case of the tool I am using for my daily work - Eclipse - this can only be done by extending it with the right plugins. So the following enumeration lists my favorite Eclipse plugins:
- Web Tools Platform (WTP) - not really a plugin but THE extension for web developers. Based on a lot of code that IBM donated from their Web Application Developer the Eclipse Team and many other developers built a great environment for developing J2EE applications. Including
- Editors for JSP, XML, XML Schema, XSLT, WSDL and many more
- Wizards to create Webservice servers and clients
- Validators
- Server configuration for testing
- and many more …
- Subclipse - The built in support for CVS is great but if you want to an use SVN repository you need this plugin. It integrates perfect and works great - but still I hope that there will be built in support soon.
- Eclipse SQL Explorer - Every application needs to store its data somewhere, right? This plugin allows you to control every database you can get a JDBC driver for - and even more with JDBC/ODBC. It does not matter if you just need to look up some values in a table or if you create the whole database from a script - with this plugin you can do it inside your IDE.
- Eclipse Regular Expression Tester - From time to time you need the power of regular expressions. It may be in your application code or just to find something in your workspace by using the Eclipse search. With this plugin you can create the regular expression while live evaluating it on example text.
- Spring IDE - Spring is such a great piece of OpenSource software. I do not have to say a lot about it. This plugin makes it much easier to create the xml configuration files with auto completion and validation.
Additionally I have to say that all these great plugins are free. They all are based on different OpenSource license and come to you at no cost.
May 09
The new version 1.3 of the Brosinski regex plugin for Eclipse is now completely free. Great decision - thanks!
I tested some regular expression tools for Eclipse (e.g. QuickREx) but the Eclipse Regular Expression Tester from Brosinski IMHO is the best. It allows you to create regular expressions in the JDK style that can be used directly in your Java code or the search dialog of Eclipse.
Recent Comments