Layout Image
  • Home
  • RCP Training
  • OSGi Training
  • Contact

Archive for April 2007

No icon, no editor

by Patrick
April 30th, 2007

There are many parts of RCP that are a little rough around the edges. That’s to be expected in an open-source framework, and to be honest it’s one of the things I like about RCP. Sure, commercial frameworks are cleaner and packaged more “professionally”, but they have to give up a lot of functionality and dynamism to achieve this.

But once in a while I hit a problem that just makes me go ugh! (and grrrr!). One of the best examples of this is the fact that if you don’t give an editor an icon, your editor won’t show up. If you happen to have logging turned on (and if your launch configuration does not include the -consoleLog parameter, it really should), you’ll at least get a somewhat informative message on startup:

!ENTRY org.eclipse.ui 4 4 2007-04-30 15:37:05.037
!MESSAGE Plugin com.marketcontours.ui.builder, extension org.eclipse.ui.editors
Required attribute 'icon' not defined

But you may not understand the true importance of this message until you try to open your editor. At that point you’ll more than likely get a very unhelpful NullPointerException, as the editor registry will simply return you a null editor.

I probably shouldn’t admit this (being a trainer and all), but I’ve actually had this happen to me repeatedly, and for some reason it always takes me a while to figure out what’s going on. It may have something to do with my failing to believe that omitting an icon could have this kind of effect. Also, in every class I teach, there is at least one student that hits this problem and is completely dumbfounded. I’m going to assume based on this random sample that many beginning RCP developers run into this.

There is already a Bugzilla entry for this defect (it’s actually listed as an enhancement), if you feel like voting for it.

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Rich Client Platform, Tips
Comments (4)

Common Navigator Tutorial 1: Hello World

by Patrick
April 25th, 2007

The Commons Navigator Framework is one of the more complex parts of the Eclipse API. It can be difficult to get started with the framework, and one of the hardest parts is simply getting a basic navigator to appear with custom content. This tutorial is designed to get you to that point so that you can start exploring the framework on your own.

There are quite a few steps, but it’s not as bad as it looks. So let’s get started!

Read More→

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Rich Client Platform, Tutorial
Comments (51)

Using the Common Navigator Framework in an RCP Application

by Patrick
April 20th, 2007

The Common Navigator Framework was introduced in Eclipse 3.2 to provide navigators with pluggable content, filters, sorting and much else. It’s a powerful new feature, but for some reason it wasn’t made to work with the RCP. In my opinion. every significant addition to the Eclipse API should be made RCP compatible unless it’s really IDE specific. RCP compatibility shouldn’t just be an afterthought, it should be a core design principle. Ok, I’ll get off my soapbox now.

RCP developers have gone through a lot of pain trying to get the CNF to work, and most of these attempts involve trying to fake out the mechanism that discovers a navigator’s root node. The approach I’ve taken is a bit simpler – just extend it. The core of the CNF is the CommonNavigator class, which is meant to be used as is. My approach is to extend this class and override the getInitialInput method, which is responsible for root node discovery. I’ve done this on a number of projects, and the rest of the CNF works as expected.

Hopefully someday I’ll be able to use the CNF as intended, but this is a small price to pay for now.

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Rich Client Platform
Comments (14)

Switching to WordPress

by Patrick
April 18th, 2007

For the past few years I’ve been working with Drupal, and while I love it for large sites, it was obviously overkill for a simple blog like mine. The real reason I’m switching to WordPress, though, is spam. I’ve tried the Drupal spam module, I’ve tried captchas, I’ve laughed, I’ve cried. Now I’m moving to WordPress and hopefully I can kiss my spam problems goodbye. We’ll see…

I’m excited to start posting again and to actually be able to turn comments on! I’ll be getting things going with a few posts on integrating the Commons Navigator Framework into an RCP application.

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Meta
Comments (2)

Want to know more about RCP training?

Get information on private training options, pricing, availability and references.

Email address

Want to learn RCP online?

There are still spots available in the next online RCP Quickstart course being held February 27 - 29.

About me

Patrick Paulin

Patrick Paulin is a software developer and trainer specializing in modular technologies such as OSGi and the Eclipse Rich Client Platform.

Patrick lives in Madison, Wisconsin with his wife and two daughters.

Email - patrick at modumind dot com

Modular Mind
Copyright © 2012 All Rights Reserved
iThemes Builder by iThemes
Powered by WordPress