private static ImageDescriptor scale(ImageDescriptor descriptor, double scale) {
String key = "" + descriptor.hashCode(); //$NON-NLS-1$
key += new Double(scale).hashCode();
ImageDescriptor cache = getImageRegistry().getDescriptor(key);
if (cache == null) {
cache = new ScaledImageDescriptor(descriptor, scale);
getImageRegistry().put(key, cache);
}
return cache;
}