Bug 156747 Adopt Resource.getDevice() in the JFace resource managers
SWT has recently added a Resource.getDevice() method. This allows several improvements to be made to the JFace resource managers: 1. The (inefficient and complex) heuristics that detect a device by creating temporary resources can be removed. 2. The one-argument descriptor factories that don't take a Device can be made just as efficient as the two-argument versions. 3. The descriptor factory methods that take a Device can be deprecated, since the second argument is no longer required and the one-argument version is just as efficient.
bundles/org.eclipse.jface/src/org/eclipse/jface/resource/ColorDescriptor.java
/**
     * Creates a ColorDescriptor from an existing Color, given the Device associated
     * with the original Color. This is the usual way to convert a Color into
     * a ColorDescriptor. Note that the returned ColorDescriptor depends on the
     * original Color, and disposing the Color will invalidate the ColorDescriptor.
     * 
     * @since 3.1
     *
     * @param toCreate Color to convert into a ColorDescriptor.
     * @param originalDevice this must be the same Device that was passed into the
     * original Color's constructor.
     * @return a newly created ColorDescriptor that describes the given Color.
     */
    public static ColorDescriptor createFrom(Color toCreate, Device originalDevice) {
        return new RGBColorDescriptor(toCreate, originalDevice);
    }
    
    /**
     * Creates a ColorDescriptor from an existing color. 
     * <p>
     * This is less efficient than <code>createFrom(Color, Device)</code>, so this