// Get the icon resource of the extension.
String iconPath = dict.get(SimpleShape.ICON_PROPERTY);
Icon icon = new ImageIcon(bundle.getResource(iconPath));
// Get the class of the extension.
String className = dict.get(SimpleShape.CLASS_PROPERTY);
SimpleShape shape = new DefaultShape(bundle.getBundleContext(),
bundle.getBundleId(), className);
processAdd(name, icon, shape);
return shape;
}