July 28, 2004

Growing to love Eclipse

Uh, wow.

I've been working with Eclipse over the last few days as I seem to be writing quite a lot more Java, and hacking on other people's Java.

It's an absolute pig to get working right, compared to the joy and simplicity of a text editor. But once you're over that initial culture shock (what, you mean only half of my screen is actual editing space?!), it really starts to pay off.

I've been trying to track down an annoying problem with Ant not liking JUnit, and it turns out there's a better way to do unit testing in Eclipse:

You should be able to run any of the JUnit tests in Eclipse by right-clicking on them and going to Run → JUnit Test.

Yeah, that's really nice. And works fantastically well.

And while we're at it, how about this?

Another useful Eclipse trick is to use abbreviated package names. [...] its nice on projects where you're inflicted with super.long.package.name.syndrome. Go to Window → Preferences → Java → Appearance. Check the "Compress all package names" checkbox and type "1." (no quotes) in the text field.

o.a.c.c.treeprocessor is way easier to read than org.apache.cocoon.components.treeprocessor. Fantastic!

Both of these tips came from this excellent blog, specifically tihs article on setting up a project in Eclipse.

Posted by savs at July 28, 2004 2:02 PM
Comments

Only half your screen is editor? Here's another one for your box of tricks: Double click the editor's tab. It'll go full screen. Nice.

Posted by: Paul Russell at July 29, 2004 9:04 AM

One thing to be warned of: Eclipse is a **complete** bitch when moving between versions - especially when you want to use extra modules. Also be careful NOT to use module versions of different versions to your install. it goes without saying, that the latest stable is usually the best version to run...

The perspective idea is brilliant, allowing you to configure optimal coding and debugging views, as well as its feature to allow multiple versions of code to be run though the system at once. Not only that, but minor changes to code do not nessicarilly mean a restart of your current test, and also code does not need to be syntactically complete for code to be debugged (which would usually return a compile error). The only downside is that debug runs at about 1/10th the real speed, and that even if you say run, (ie not debug) it runs at 1/2 real speed (I presume this is something to do with the way that it is scheduled as part of the current process as opposed to a process of its own(?))

Have you seen the visual editor for it? It makes rapid front end creation really easily. The only downside is it executes your code as you are writing it, so if you plan on writing long functions behind graphical drawing applications, you better find the stop button in the bottom right corner pritty fast.

Eclipse also has some pritty nice team tools, including its own team compare, as well as CVS and SNV modules which I believe the SNV is optional at the moment.

The only bad thing about installing Eclipse at the moment (if I rember correctly) is that you need a really good install of Java - preferably Sun's own one, and even if you do, you have to manually configure Javadoc for it, which isnt too hard, and that the modules are all just simple unpack into the directory, and configure themselves.

The only thing I would like to see changed is its package finder - it does not currently auto complete - oh sure, if i start typing it shows relevant packages, but not quite how I want them - ie if I start with "ja" it shows classes called ja not the java. trees that I might be looking for.

The other issue I have with Eclipse is its website - the mirrors are all of the same directory file name but impossible to navigaate because of the wierd numbering. You have to use the american main server to find which file you want before you can download it from your localised mirror. It would be nice for them to be true mirrors of the navigation as well as just the files/directories. Does that make sense?

Posted by: James Taylor at August 10, 2004 11:10 PM