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 new FontDescriptor given the associated FontData
     * 
     * @param data FontData describing the font to create
     * @return a newly created FontDescriptor
     */
    public static FontDescriptor createFrom(FontData data) {
        return new NamedFontDescriptor(data);
    }
    
    /**
     * Creates a new FontDescriptor given an OS-specific font name, height, and style.
     * 
     * @see Font#Font(org.eclipse.swt.graphics.Device, java.lang.String, int, int)
     *
     * @param name os-specific font name
     * @param height height (pixels)
     * @param style a bitwise combination of NORMAL, BOLD, ITALIC 
     * @return a new FontDescriptor
     */
    public static FontDescriptor createFrom(String name, int height, int style) {
        return createFrom(new FontData(name, height, style));
    }
    
    /**
     * Creates the Font described by this descriptor. 
     * 
     * @since 3.1 
     *
     * @param device device on which to allocate the font