private Map imageTable = new HashMap(7);
public Image getImage(Object element) {
IRosterItem item = (IRosterItem) element;
IRoster roster = item.getRoster();
IWorkbenchAdapter adapter = getAdapter(roster);
if (adapter == null)
return null;
ImageDescriptor descriptor = adapter.getImageDescriptor(roster);
if (descriptor == null)
return null;
Image image = (Image) imageTable.get(descriptor);
if (image == null) {
image = descriptor.createImage();