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/FontDescriptor.java
/**
     * Creates a FontDescriptor that describes an existing font. The resulting
     * descriptor depends on the original Font, and disposing the original Font
     * while the descriptor is still in use may cause SWT to throw a graphic
     * disposed exception. This is less efficient than <code>createFrom(Font, Device)
     * </code>, so the other version should be used whenever possible.
     * 
     * @since 3.1
     *
     * @param font font to create
     * @return a newly created FontDescriptor that describes the given font
     */
    public static FontDescriptor createFrom(Font font) {
        return new ArrayFontDescriptor(font);
    }
    
    /**
     * Creates a new FontDescriptor given the an array of FontData that describes 
     * the font.
     * 
     * @since 3.1
     *
     * @param data an array of FontData that describes the font (will be passed into
     * the Font's constructor)
     * @return a FontDescriptor that describes the given font
     */
    public static FontDescriptor createFrom(FontData[] data) {
        return new ArrayFontDescriptor(data);
    }