Eclipse Europa Review

About this review

OK, so it looks like I can win a t-shirt doing an Eclipse Europa review, and it happens that I've been using it since M7 (the last release before RC0). So, even if I don't get a t-shirt, I'll post this, because I'm a nice guy and I want people to benefit from my living on the bleeding edge.

Before going on with the review, it would probably help readers to know what my Eclipse usage profile is. I use Eclipse mostly at work (http://www.alogient.com), where we build web applications and web sites. I'm currently doing a lot of work on a transactional Java application, using Maven 2 as the build system, Struts 1.2.9 (yes, I know, it's old... it's also stable and well-known), Hibernate 3.3.2 + patches, PicoContainer 1.2, Jakarta Commons Lang and Collections, and other miscellaneous libraries.

Given that, I won't use a lot of the new features touted by Europa (and specifically WTP 2.0), such as JPA and JSF support. JPA may get some use someday. JSF... nah. My only experience with JSF was extremely painful, so I don't really want to use it.

So, let's see the new features I'm likely to use in WTP:

  1. Support for JSP tag files. We've started to use JSP tag files quite a bit, and I'm looking forward to better support for them.
  2. Better HTML and JSP formatting when requesting a "format everything" (CTRL-SHIFT-F)
  3. Better publishing performance.
  4. Improved "maximize editor" behaviour.
  5. Improved generics warnings.
  6. Rename refactoring changes.
  7. Ability to refactor without saving.
  8. Class editor showing disassembled code.
  9. Improved presentation of libraries in project explorer.

(In case you're wondering, I've had to recall this from the new and noteworth pages, because I've been working with Europa for long enough that I don't recall many specific enhancements)

First impressions

My first impressions once I boot the new Eclipse is that they've made it a bit faster, again. I can't really quantify this, but overall, the IDE feels snappier, especially when dealing with the WTP features. This is a great time saver in the regular look at web page/fix bug/publish/restart server cycle. More speed is always a good thing, especially since I run Eclipse on Linux/GTK+, which is usually slower than under Windows.

The workspace switching improvements are welcome, letting you switch between recently used workspaces without having to open the "Switch Workspace" dialog.

I initially imported my settings from a settings export of 3.2.2. This worked mostly OK, except for the XML syntax highlighting which, somehow, always loses my colors. This is very annoying, given that I like to use a dark background for code (OK, XML isn't really code, but it still gets a dark background). Even after importing my settings, the XML editor ends up having all content and CDATA sections in black-on-black. This kind of thing is commonplace in Eclipse and is generally annoying.

I took our main project (with its project files generated by Maven) and published it to Tomcat 5.5. It worked like a charm, and publish was significantly faster, especially the initial publishing operation.

From a stability point of view, M7 was so-so, but RC0 was pretty solid. I've yet to see it behave badly. It looks more stable than 3.2, especially the WTP features.

Refactor changes

One of the "big deals" with this release is the "inline" rename refactor. Essentially, you select the "rename" refactor (CTRL-ALT-R) and instead of getting the old rename dialog, you get to retype the new name and press enter; the rename is then applied. I've seen this feature in IntelliJ IDEA as well.

My experience with this feature is summarized as follows: I turned it off. There were two annoying things with it:

  1. I often fire the refactor with the cursor in the middle of the identifier to rename. Eclipse doesn't pre-select the identifier, so typing the new name immediately doesn't overwrite the old name; instead, it inserts the new character at the position you were in. I assume some people like it that way, but I'm used to the old way of working, and to me, positioning the cursor prior to invoking the refactor interrupts my flow more than typing the new name. Note that I'm a fast typist, so this may make a difference.
  2. After running the refactor, all editors "flicker" briefly, and I'm always worried that the refactor wasn't applied properly or something. I agree that this is largely psychological. But it's another reason for which I turned off the new feature.

So, your mileage may vary, but I think it this feature could get a little bit of polish. Maybe having an option to auto-select the renamed symbol so retyping would overwrite the old name. At least, from a "key feel" point of view, it would be more similar to the dialog, without having to lose the advantages of the in-editor rename (you see more context, it's less obstrusive, etc. etc. etc.)

The other big change I noticed in the refactoring support was the ability to refactor without saving files. This appeared to work well, and it's seamless enough that I'm not nervous about enabling it. The only thing that's slightly annoying is that when you build automatically and you do certain refactors with global impacts, Eclipse may flag a bunch of errors until you save your refactored file(s). This is probably due to the way the compiler works. But it's really not a big deal at all.

HTML and JSP improvements

The new HTML and JSP formatters are very much welcome. They do a much, much better job than the old ones, and I can actually (gasp!) use them to format blocks of JSP or HTML without fear. The old ones really mucked up our JSPs. The ones I've tried the formatter with use JSTL; I haven't tried it with scriptlet-heavy files, but hopefully, I don't have to work with those for some time. :-)

The JSP tag file support appears to work well. However, thanks to the use of an Appfuse-like taglib include at the beginning of every JSP file, it doesn't work in my everyday job, because the taglib declarations are stowed away in another JSP fragment. It looks like Eclipse doesn't see them in this case. I've resorted to copy-pasting the declarations temporarily while I work with the file so I can benefit from autocompletion. In that case, it works well.

Unfortunately, it doesn't work that well with custom tags sitting in custom JAR files that come from internal projects. I have that small library with JSP tags, which is included through a project dependency. I could never get autocomplete to work with those tags their TLD file is in the META-INF directory of the source tree). Oh, well.

The tag file support also works for editing the tag files themselves. This is not a big deal, but it does avoid a bunch of spurious warnings about unknown tags when working with those. If you use a lot of tag files, you'll be much happier with WTP 2.0 than with 1.5.

Additional polish

The new look when maximizing editors (with the package explorer, etc. minimized to the side) and the fact that minimizing the docked windows actually minimizes them (instead of turning them into a space-wasting horizontal bar) is a much overdue enhancement, and I'm very happy it's done. Also, the fact that maximizing the editor window does not close the secondary tab group is very welcome, since I tend to work with two tab groups, a habit I've kept from my old Emacs days.

The additonal diagnostics for generics are somewhat useful. They do catch a lot of strange corner cases in the generics specifications. Since we use generics rather heavily (and sometimes in exotic ways), I'm happy with this addition, but I think most developers won't notice.

The improved library presentation also fixes a small annoyance. I used to have to filter out all libraries from the project view to avoid having a huge set of crap in there. Especially for Maven-driven projects, which include every JAR in the world, this is an important feature.

Finally, the class disassembly is very nice, but unfortunately, with Maven's automatic source download feature, I don't use it anymore. Wish I'd had that a year ago...

The less good

This is supposed to be a balanced review, so I have to say something bad... bear with me.

The main annoyance with this release is that a lot of those new features have additional preferences, but those only overload the already busy preference panes. One more checkbox here, one more checkbox there, and you end up with a huge amount of checkboxes. The Eclipse preferences are comparatively messy compared to, say, Netbeans'. In all fairness, Netbeans' doesn't let you configure all that much unless you go to advanced mode, but maybe an advanced mode is what Eclipse needs. All I know is that it's starting to get really, really busy in there, despite the fact that some preference pages have very little on them (see General | Search, for instance). To me, it looks like the nature of the project (it's a plugin-driven platform) has unfortunate side effects when it comes to preference management.

The only other annoyance for me is that I was becoming spoiled rotten with the new features every minor release of Eclipse was bringing. This release does not bring much new stuff, especially from the basic IDE front. This is somewhat less true of WTP, but I'd still like to see more advanced IntelliJ features in WTP, like advanced refactoring support for CSS files. As such, Europa is a bit underwhelming. It seems like many of the features are "gadgets", and there isn't much new stuff. I'd like to see implementation of more refactorings, for instance.

Final throughts

Still, despite all this, it looks like a worthy release. The additional features in WTP are nice, and it's probable that the JSF developers out there will be even happier. And, despite my whining about the lack of "big" changes, the small things count quite a bit as well, such as the new maximized look and the increased performance.

Is it worth upgrading from Eclipse 3.2/WTP 1.5? Well, maybe. I guess it depends what features you're using. For me, it was worth it, if only for the increased performance. It will be worth it eventually anyhow. But for the average Java/JSP developer, I'm not sure there's a compelling reason to upgrade as soon as it's hot the press. For EJB or JSF developers, the picture is likely to be very different, but I admit that I don't use those technologies much anymore.

Still, Eclipse will remain my main IDE. As an aside, yes, I've tried Netbeans 6, but there's always something in the way it wants to work (usually with web projects) that don't match my way of working. Eclipse is very complex, but it's also very flexible, and I always manage to make it do what I want. That is why it remains my main IDE, and why I'll upgrade to Europa. Hey, what am I talking about! I'm already running it! :-)


james_027 said...

Nice article. Especially that you touch the WTP. I like what I've heard about the formating features, and at the same time I hope on the final release support for custom jsp tag could be much better. Is it a fact that eclipse run faster in win32 than linux/gtk?


bge said...

They've improved the linux/gtk speed quite dramatically starting with 3.1, but it still feels a bit more sluggish under Linux. Though my test is quite unscientific--it's done on two machines that have similar, but not quite the same, hardware. My peers (who all run Windows) seem to think Eclipse is very, very fast, where it appears only "fast enough" to me. But then again, I was an emacs user... :-)

-- BGE

Geir said...

You mention that you use Maven 2.0 for building your application. How is Maven's support for WTP 2.0?

I use the maven-eclipse-plugin to generate wtp specific project settings and found that I have to run the 2.4-SNAPSHOT version of this plugin for it to create correct settings for a WTP 1.5 project (when running "mvn -Dwtpversion=1.5 eclipse:eclipse". I can't imagine that Maven support for WTP 2.0 is better than for 1.5.

Have you tried this yourself? Would be nice to know before I start testing the new version...

Nice article, by the way :)

Cheers, Geir

bge said...

I use the maven-eclipse-plugin version 2.3 (the latest non-snapshot in the repository), and I haven't had any problems with WTP 1.5 or 2.0. My project doesn't contain nested WAR files yet, though. What problems have you had, exactly?

-- BGE

Geir said...

problems occur only when I set "-Dwtpversion=1.5 " which is needed to activate the WTP project functionality.

The maven-eclipse-plugin (version 2.3) then ignores the fact that my pom.xml is set up to use Java 5.0 and sets the "Project Facets" (Project property in Eclipse) to "Java"=1.4 instead of 5.0, and "Dynamic Web Module"=2.3 instead of 2.4). This results in a heap of errors in the project and it will not build because I use Java 5.0 stuff.

This does not happen if I use the 2.4-SNAPSHOT version of maven-eclipse-plugin.

If you only use Java 1.4 stuff and you stick to Servlet 2.3 standard that could be the reason you have no problems, or perhaps you've got that extra config details I'm missing..?

bge said...

Aha! This explains it... I am using JDK 1.5, but JDK 1.4 isn't even present in my Eclipse configuration (I don't think I even added the runtime).

This kind of problem may be fixed in the latest Eclipse, but you may have better luck using a workspace that doesn't have the JDK 1.4 configured. OR running Eclipse with JDK 1.5 (I run it on JDK 6 myself). Which is a good idea anyhow; it's quite a bit faster with newer JDKs.

Hope that helps...

Nitin Dahyabhai said...

Be sure to open bug reports for any weirdness supporting tag libraries and tag files. We're keen to make them "just work" as much as possible.

hontvari said...

I also used to filter out libraries in the project from the package explorer view, but the filter I used ("Libraries in Project") disappeared in Europa. It seems that you no longer need this filter, what do you use instead of it?

t800t8 said...

Did anybody try to update Eclipse? I've just downloaded Eclipse package for Java developers, when I try to install WTP, after clicking + (plus) node before "Web Tool Platform (WTP)", Eclipse hangs up. So I throw Eclipse away to come back with IDEA.

Wayne said...

>Did anybody try to update Eclipse? I've
>just downloaded Eclipse package for Java
>developers, when I try to install WTP,
>after clicking + (plus) node before "Web
>Tool Platform (WTP)", Eclipse hangs up.

Yup. Just did and it worked fine. Interested in trying to sort out the problem?

Are there any messages in the log? Any network activity during the hang?

bge said...

@hontvari: all libraries are coalesced in a single subfolder. So instead of having them mixed with other items, you get a single subfolder icon. Expanding it shows all the external libraries. With this, I don't feel I need for the filters.

As far as libraries in the project goes, I'm not sure whether they get collapsed. I dislike keeping libraries in the project myself, especially since I've been using Maven for dependency management.