My new RCP example has nothing to do with Swing

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.

This entry was posted in Uncategorized. Bookmark the permalink.

14 Responses to My new RCP example has nothing to do with Swing

  1. Scott Delap says:

    Nice use of Swing in the title.

  2. ??????? says:

    Um, sorry to hijack this, but how do you add actions to a view ? I mean, like the “New task…” and “Delete” you have added ? Thanks!

  3. Dominik says:

    Sounds really nice :)The screenshot reminds me of the mylar task-list view a bit. Just coincidence? But why bother.. we all trust google don’t we?😉

  4. Dave says:

    In the org.eclipse.jface.examples.databinding plugin, we have the start of some nice new calendar controls. One is like an Outlook or PalmOS day view or work-week view and the other is like a month view.The day view is pretty complete. The month view is barely started.(They both rely on a new virtual table control called CompositeTable that supports in-place editing natively and only fetches rows that it is currently displaying.)Since the Eclipse code base is in lockdown mode for the 3.2 release, all new development is being done on a branch. To see how things generally work, check out the version3_2_lockdown branch from CVS and run DayEditorTest as an SWT application. This will launch an SWT control in a Shell with some hard-coded appointments to browse. You can look at the code to see how things work; it’s pretty straightforward.

  5. Mik Kersten says:

    Neat stuff Wayne, and I couldn’t agree more that it’s important to have this sort of task management integrated with Eclipse. A key goal of the elcipse.org/mylar project is to provide a framework and tools for task management, and we believe that it is critical for Eclipse to have a single and well-integrated task management user interface. Otherwise users will end up with a different and inconsistent UIs for each issue tracker they use, and yet another for this kind of personal task management. Having a single framework also means that the integration can be consistent. For example, whether you are working with personal tasks, Bugzilla, or JIRA reports, Mylar allows them to consistently correspond to change sets, be hyperlinked from code, participate in planning and progress reports, etc. Have you considered extending Mylar’s Tasks framework to add any features that you are lacking? We already support much of what you list (refer to the Task List sections of the New & Noteworthies, http://www.eclipse.org/mylar/doc/new.php), and would be happy to discuss other features and ensure that the framework is extensible to your use cases. Fyi, the Task List is not coupled to Mylar’s Task Focused UI and can be used with RCP apps.Mik Kersten, Mylar Project Lead

  6. Wayne says:

    Mik: Gee… that’s one place I didn’t look. How embarassing. I’ll make a point of it; and if I can move some of my work into/over yours, I will. Makes sense to me.

  7. Wayne says:

    ???????: If you just create a view using the PDE, it comes complete with the actions (provided you check the appropriate options on the last page of the wizard). Mine show text because I haven’t come up with an icon for ’em yet.

  8. ??????? says:

    Thanks! I had to hunt a bit, since the wizard will not appear in the New… menu, but only in the plugin.xml editor… I’m thinking on filing a usability issue for this.

  9. Mik Kersten says:

    Wayne: that’s understandable as we still need to make the online documentation of our framework components more clear (tasks, context, monitor fyi).I would like Mylar to have a driver to ensure the tasks framework works for RCP apps (for example, right now there is a soft dependency between mylar.core and eclipse.resources that should probably go away). It would be great if you could file a new Bugzilla report if you’re interested in our supporting a ‘pure’ RCP configuration: http://www.eclipse.org/mylar/bugs.phpAlso, please feel free to file another Bugzilla report regarding extensibility or other enhancements related to your plug-in.

  10. Michael says:

    Nice work. I came across your Organizer project by doing a web search for “Eclipse, JFace, and MS Outlook” I’m interested in drag and drop capabilities from Outlook to my Eclipse RCP application. How successful were you in getting this to work? I found your PPT presentation, “Discover the Anatomy of an Application Based on Eclipse” where you discuss your drag and drop with Outlook: “-Only information provided by the drag contents is obtained-Subject, due date, priority, and complete state-Obtaining details requires querying Outlook through .Net (haven’t had the nerve to work this out yet).”I was wondering if you have gotten more than just the subject, due date, priority, and complete state to drag over to an RCP application? Can one get access to the Outlook email body text, any attachments, or other meta data about the email object being dragged?thanks,Michael

  11. Wayne says:

    Hi Michael. Nope, I didn’t get any further with Outlook yet. I did poke at it a while, but it just wasn’t a high enough priority to invest the time. I would be interested in collaborating…

  12. Michael says:

    Is it possible to get more data from Outlook messages by just using Java/JFace drag and drop APIs, or is it necessary to integrate with .NET?

  13. Wayne says:

    From what I can tell, only the basic information is loaded into the drag event by Outlook. I poked around a bit on the web and couldn’t come up with a better answer. It’s not (AFAIK) a Java/JFace limitation.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s