String imageName = info.getAttribute("icon");
ImageDescriptor iconSmall = SharedImages.getImageDescriptor("icons/" + notation + "/palette/" + imageName, true);
if (iconSmall == null) {
return null;
}
PaletteEntry entry = null;
if ("node".equals(type)) {
entry = new CreationToolEntry(label, null, factory, iconSmall, null);
}
if ("connection".equals(type)) {
entry = new ConnectionCreationToolEntry(label, null, factory, iconSmall, null);
}
entry.setId(id);
return entry;
}