A Django site.
March 12, 2007
» Image Compare in Eclipse

Did you know that the built-in Eclipse compare tools support comparison of images? I didn't realize this until the other day when I tried to compare an image in version control to a previous version:



Pretty cool! I don't know when that was added, but it was new to me. Of course, all of the compare functionality that comes with Eclipse is exposed by the Teamprise plug-in for TFS-versioned projects. The above dialog is our own custom compare dialog that leverages much of the Eclipse compare code, and adds nice features like changeset info.

March 8, 2007
» Resources for developing against Eclipse

I spend a lot of my time these days developing Eclipse-based applications. My employer (Teamprise) makes, among other things, the Teamprise Plug-In for Eclipse and Teamprise Explorer (an RCP app), both of which allow access to Microsoft's TFS. As I've spent time developing for the Eclipse platform, I've come to realize that finding the proper resources is critical to getting the job done right. In this article I'll share a few tips and pointers to resources I've come to rely on. Hopefully this brief article will be of help to someone who is just starting off developing for Eclipse - this is the list of resources I wish I had pre-compiled when I started.

Developing against Eclipse can be both simple and complex at the same time. Many of the individual tasks are quite simple (once you understand enough context around the task). At the same time, the "big picture" for Eclipse can be very complex. Eclipse has a huge codebase, a huge user community, and a huge number of people developing solutions on top of it. These are very good things. The chances that you will encounter a totally unique Eclipse programming problem that no one has ever had to solve are pretty slim. There is a lot of help out there. However, these can be bad things at times too. Eclipse is a moving target. Advice given for some previous version of Eclipse may no longer be valid for a current version. There is often so much information out there that finding the needle in the haystack can seem impossible.

Books
If you're doing professional Eclipse development, there is no excuse for not having a library of books on the topic. Even if you're programming against Eclipse for a hobby, a small investment in books will pay dividends down the road.


The primary book anyone developing Eclipse plug-ins must own is Eclipse: Building Commercial-Quality Plug-ins by Eric Clayberg and Dan Rubel. This book could be considered the Bible of Eclipse plug-in development. A second edition was recently published, so make sure you get that version. Here at Teamprise we keep the first version around as well since we also target older versions of Eclipse with our products. If you only buy one Eclipse development book, this is the one you should get. Keep in mind that this book is really geared toward the topic of plugin development only. It doesn't go deeply into other important topics like SWT, JFace, or RCP applications.


You'll also need at least one book as a reference to SWT and JFace. SWT is the cross-platform GUI toolkit Eclipse is built with, and JFace is an abstraction library on top of SWT. Since much of the work you do will involve writing GUI code, you need a book that both explains the mechanisms of SWT and serves as a reference to the many classes that make up SWT. To fill this need, I currently recommend The Definitive Guide to SWT and JFace by by Robert Harris and Rob Warner. This isn't a spectacular book on SWT/JFace, but it is the best that I've come across so far. This book isn't of the same caliber as Building Commercial-Quality Plug-ins, but it serves as a basic reference book. It is pretty dated at this point, as it covers the version of SWT that was released with Eclipse 3.0. Hopefully there will be a second edition at some point.


The Java Developer's Guide to Eclipse is a good book to have on the bookshelf as well. This one is very broad, but does not go deeply into the topics. Unlike the other books I mentioned, this book includes information on how to use Eclipse as well as how to develop for it, making this book a good choice for someone totally new to Eclipse. There have been a number of times that I could only find something I was looking for in this book as it covers such a wide range of topics.

Probably the best solution is to have a number of Eclipse books on hand, including at least the ones mentioned above. Since Eclipse development is such an extensive topic, there can never be a single book that covers everything you need to know.

Articles on eclipse.org
If you haven't already bookmarked http://www.eclipse.org/articles/, then you've been missing out on a very valuable Eclipse development resource. The coverage here is very deep, but not necessarily broad. Whenever starting a new or unfamiliar task in Eclipse, take a few moments to see if there is an article on the topic. These articles are often great supplements to the class javadoc for the Eclipse APIs. Even better, the articles are often written by people very familiar with the Eclipse implementation code, so the information here is straight from the horse's mouth so to speak. Note that anyone from the Eclipse community can contribute articles, so if you have extensive knowledge on a topic, consider submitting an article for the benefit of others.

Newsgroups
One of the most important Eclipse development resources has to be the newsgroups. You can search through the extensive archives or browse all postings. There are lots of different groups, so at first it can be confusing knowing which group to look in. Luckily, you can search across all of them, and it pretty quickly becomes clear what ends up where. There's not really much more to say about the newsgroups - there's a wealth of information there, so take advantage of it.

Bugs
Believe it or not, some of the best information about various Eclipse development topics can be found in the official Eclipse bug tracker. This is especially true for newer topics and things that have changed recently and haven't yet been covered by other resources. I recommend always doing a keyword search here before starting on an unfamiliar topic. There are lots of nuggets of information here (if you can find them).

Community Websites
Like most large software communities, Eclipse has its share of third party websites. The one I frequent most often is EclipseZone, which has articles and forums. There are also a number of blogs written by Eclipse committers. users, and third-party developers. This is by no means an extensive list of Eclipse-related blogs, but a quick scan through my feed reader turned up these:
http://alblue.blogspot.com/index.html
http://borisoneclipse.blogspot.com/
http://eclipse-desudation.blogspot.com/index.html
http://www.ji.co.za/unplugged
http://tom-eclipse-dev.blogspot.com/index.html
http://www.edwardthomson.com/blog/ (also a Teamprise developer)
http://ianskerrett.wordpress.com/
http://inside-swt.blogspot.com/index.html (Steve Northover's blog, highly recommended)
http://milinkovich.blogspot.com/index.html (Mike Milinkovich, executive directory of the Eclipse foundation)
http://jroller.com/page/mpermar
http://www.woodwardweb.com/ (also a Teamprise developer)
http://jroller.com/page/murphee
http://mea-bloga.blogspot.com/index.html

Code
There is a wealth of code out there to study and use as starting points. Besides Eclipse itself being open source (under a very commercial-friendly license) there are numerous open source third-party plug-ins for Eclipse to look at. At a minimum, take some time to look over the code included with the Eclipse plug-ins that your plug-ins depend on. The public Eclipse API is usually well documented and the code itself is pretty readable. Another great code resource is the SWT Snippets page. Chances are, if you're trying to do something with SWT, you can find an example snippet on that page.

Eclipse Help
Finally, don't forget about one of the most useful Eclipse development resources - the help that ships with the Eclipse SDK! This often overlooked resource contains valuable information about developing Eclipse plug-ins. In fact, this should probably be your first stop when looking for information about a topic. The built-in help has consistently improved from release to release.