A Double Eclipse

Dr. Dobb's Journal February 2004

By Jason Montojo

Jason has worked on the Eclipse project as a member of the platform development team at Object Technology International. He is currently developing bioinformatics software for the Blueprint Initiative in Toronto and can be contacted at j.montojo@utoronto.ca.


Eclipse in Action: A Guide for the Java Developer
David Gallardo, Ed Burnette, and Robert McGovern

Manning, 2003
380 pp., $44.95
ISBN 1930110960

The Java Developer's Guide to Eclipse

Sherry Shavor, Jim D'Anjou, Scott Fairbrother, Dan Kehn, John Kellerman, and Pat McCarthy

Addison-Wesley, 2003
896 pp., $49.99
ISBN 0321159640

By now, it's obvious that user interfaces are not open-source software's strong point. Linux desktop environments such as Gnome and KDE, for example, seem clunky when compared to modern versions of Windows or Apple's latest offerings, and open-source's IDEs have always lagged behind their closest commercial counterparts.

Luckily, this is changing. Over the last four years, IBM has built a first-class open- source IDE in Java called "Eclipse," and a large development community has grown up around it to fix bugs, add features, and build new plug-ins. More importantly, tens of thousands of developers are now using them to build real applications.

The best thing about Eclipse is its rich feature set; unfortunately, this is also the worst thing about it. With every major and minor release, boatloads of new tools and functionality creep in like illegal immigrants—rarely documented, often well-hidden, and of course, loaded with potential. Fortunately for users, many of these shady productivity boosters have now been rounded up and exposed in Eclipse in Action, by David Gallardo, Ed Burnette, and Robert McGovern; and The Java Developer's Guide to Eclipse, by Sherry Shavor, Jim D'Anjou, Scott Fairbrother, Dan Kehn, John Kellerman, and Pat McCarthy.

Both of these books target developers who already know how to program in Java. Their aim is to show you how to use Eclipse to make development easier. In Part One, they begin by describing what Eclipse can do, and in particular, how it can make coding, refactoring, debugging, and working with a team easier to manage. Part Two of each book explains how you can add new functionality to Eclipse by writing new plug-ins. The Java Developer's Guide to Eclipse also has a third part that presents a series of exercises (with solutions) that cover the basics, including project creation and debugging, as well as more advanced topics like plug-in development and deployment.

The best aspect of both books is feature coverage. I've used virtually every release of Eclipse since 1999, yet I found myself learning new things from both books. The practical, in-depth examples are also welcome. Both new and experienced programmers will appreciate the chapters about CVS, Ant, and JUnit offered by Eclipse in Action. These tools are tightly integrated into the Eclipse SDK but are often easy to miss, especially for people who have had no exposure to them before.

Similarly, if you have a background in OO software architecture, you will enjoy Part Two of The Java Developer's Guide to Eclipse. This section thoroughly describes some of the different design patterns present in Eclipse's internals. In particular, there is a step-by-step guide to writing a smart syntax-highlighting SQL query editor plug-in, complete with class relationship diagrams and source code.

Another strength is that full example code is available for both books: The code listings in Eclipse in Action can be downloaded from the publisher's web site, while the examples and exercises in The Java Developer's Guide to Eclipse is provided with the book on a CD. One note: Although the CD says you need Windows, you really don't since the documentation is stored in HTML. The only thing that is Windows specific is the Eclipse SDK package; you can get versions for the other platforms from the main Eclipse site at http://www.eclipse.org/.

One last bonus with Eclipse in Action is its appendices, which are full of useful tidbits. Appendix A describes what each menu item does in the Java perspective. Appendix B walks you through the installation of CVS on Windows, Linux, UNIX, and OS X. Appendices D and E introduce Eclipse's UI framework, which is useful if you plan on writing your own plug-ins, and so on.

Of course, both books have their weaknesses. Part One of The Java Developer's Guide to Eclipse reads like a textbook. The authors describe sequences of tasks and operations using dense paragraphs rather than easy-to-follow point-form lists. Parts Two and Three of this book are easier to digest.

Another weakness in both books is screenshots. Eclipse runs on at least eight different platforms including QNX, AIX, and HP-UX, yet both books make it seem like Eclipse only runs on Windows. For example, after describing that Eclipse runs on a variety of different operating systems, The Java Developer's Guide to Eclipse states that you should get "...the appropriate Windows Eclipse SDK download for your system," which isn't of much use if you're running Linux and GTK.

Another example is that only Windows shortcuts are mentioned in The Java Developers Guide to Eclipse; Eclipse in Action doesn't mention shortcuts at all. It would've been nice if the authors could mention something about what the key mappings are on other platforms such as Solaris and OS X.

DDJ