super(parent, style);
setContentProvider( ArrayContentProvider.getInstance());
setLabelProvider(new LabelProvider() {
public String getText(Object object) {
ExternalCatalogueImportDescriptor descriptor =
(ExternalCatalogueImportDescriptor) object;
return descriptor.getLabel();
}
public Image getImage(Object object) {
ExternalCatalogueImportDescriptor descriptor =
(ExternalCatalogueImportDescriptor) object;
String id = descriptor.getID();
ImageRegistry registry = UiPlugin.getDefault()
.getImageRegistry();
ImageDescriptor image = descriptor.getIcon();
synchronized (registry) {
if (registry.get(id) == null && image != null) {
registry.put(id, image);
}