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/ArrayFontDescriptor.java
private FontData[] data;
    private Font originalFont = null;
    private Device originalDevice = null;
    
    /**
     * Creates a font descriptor for a font with the given name, height,
     * and style. These arguments are passed directly to the constructor
     * of Font.
     * 
     * @param data FontData describing the font to create
     * 
     * @see org.eclipse.swt.graphics.Font#Font(org.eclipse.swt.graphics.Device, org.eclipse.swt.graphics.FontData)
     * @since 3.1
     */
    public ArrayFontDescriptor(FontData[] data) {
        this.data = data;
    }
 
    /**
     * Creates a font descriptor that describes the given font.
     * 
     * @param originalFont font to be described
     * 
     * @see FontDescriptor#createFrom(org.eclipse.swt.graphics.Font)
     * @since 3.1