• Share this article:

My new RCP example has nothing to do with Swing

Tuesday, May 9, 2006 - 13:01 by Wayne Beaton

I’ve been working on a new RCP application over these past few weeks. The effort has pushed me to look at a few areas inside Eclipse that I haven’t previously explored.

I rely heavily on calendar and task management software to manage my many different roles and responsibilities. Unfortunately, all of the calendar and task management software that I’ve experimented with just doesn’t quite measure up to my requirements. So, I’ve started to build my own.

It’s started as a handful of plug-ins that just run in my Eclipse development environment. So far, I have a task list view only that, oddly enough, lists tasks that I need to complete along with useful information such as a due date, reminder date, priority, and a handy field indicating whether or not the task is complete. The view itself is rather uninteresting (but shown below because Gunnar’s going to ask). For kicks, I added the ability to add and remove columns through the pop up menu which is pretty cool (and pretty easy, actually). The columns themselves all show simple text values; I’ll be changing this in the coming weeks (I’m also going to add the ability to edit the column values in place).


The most interesting thing about the task list is actually two things: I’ve added two very useful extension points to it. The first extension point lets me, through a separate plug-in, specify a backend for storing my tasks. Right now, I have two different backend plug-ins. One stores tasks in a project in the workspace; the other stores tasks in a Derby database instance in the user’s working directory.

The second extension lets me, again through a separate plug-in, specify a “drop handler” for managing different kinds of drops onto the task view. I currently provide support for dropping tasks and emails from Outlook, or chunks of text dragged from where-ever. I’m in the process of adding drop handlers for Mozilla Thunderbird and Ward and I looked at providing one for OSX mail, but didn’t get very far.

It’s the extensibility of Eclipse that keeps me coming back.

The beauty of the backend plug-ins is that I can easily add (or remove) different ways of storing my tasks. The workspace backend requires that the resources plug-ins be available in order to work; I prefer not to include these in my RCP applications, so I just don’t include the workspace backend when I package my task list as an RCP application. However, when I’m using the task list in my development environment, I love the ability to save these tasks in the workspace since I can then also commit them to CVS and thereby share them with other people (of course, I could still do this in an RCP application if I really want to). If I ever choose to integrate with a third-party task manager, I’ll just have to build a backend to support it.

The drop handler plug-ins all get a chance to respond to a drop event on the tasks pane. A drop handler needs to make sense of the drop event and build (if possible) a collection of Task objects from the contents of the event. It took me a while to sort out how to get this information from Outlook (unfortunately, it’s not complete as I haven’t quite sorted out how to get the actual text of the dragged message/task). I’m planning to add support for dragging in iCal formatted text and files by way of additional plug-ins. This will come in time.

It’s a start. There’s still a lot of work to be done.