Vita Rara: A Life Uncommon

Eclipse


Categories: | | | | |

Yesterday I decided that it was time to check out Eclipse. My development environment for years has consisted of screen, vi, and ant. I have evolved what I feel felt was an efficient system. But, as with all new beginnings it was time to take a look around and see what was out there. The obvious thing to look at was Eclipse.

I tried Eclipse some time ago, in the 2.1 era if I recall. It just wasn't stable on Mac OS X at that time and really put me off of it. My old environment was rock solid. It never quit on me and I could log in remotely, do a 'screen -dr' and have my environment right there.

What got me looking around again this time was going through writing all the classes to implement the data layer for Quadran. It's big, repetitive, and mindless work. I figured there would be some tools in Eclipse that would help me.

Of course as in all experiments there are always issues.

The Issues

Multiple Source Directories

Eclipse assumes that all source will be stored in one directory. I just don't work that way. I split things out usually by architectural layer, and sometimes within layers by concern. This keeps me from crossing the streams.

For Quadran the source split is a bit more explicit. I have split the core of the application into areas of concern. Then each major module will be in its own source tree, with client customer modules in their trees. Every nice and tidy all separated.

If you have this issue, and likely a legacy project will, go to Project -> Build Path -> Source. Add the top folders for your source trees and everything will work now. Eclipse will be able to understand what package the file is in, and you will be able to navigate type hierarchies if you want to, even across source trees.

Building

I use ant. I love ant. I don't have any reason to leave ant. My build process is complex, and ant handles it with aplomb.

I'm not up to speed completely on the ant integration. Towards the end fo the day I discovered the Ant view. It will prompt you for a build.xml file and then it will show you all the targets in the file, which you can double click to run. It works and that's what I'm using.

The results of the ant run appear in the Console view. If there is an error in a file you can click it and it will open in the editor. That's a time saver.

One thing that tripped me up is that I used to store my local ant setting in a build.properties file. Apparently that file name in the root of a project has some special meaning to Eclipse. So, I renamed it ant.properties. Simple enough fix.

Epilogue

So, if you've eschewed the IDE world for a long time, Eclipse might be worth a look see. It's come a long way since the 2 series. I've become productive in less than a day. I think I will be faster in Eclipse than I used to be in my old environment.