Bug 150593 Enhancements for ResourceManager
The attached patch addresses the following in ResourceManager - Fixes several JavaDoc bugs - Adds a "getImage" method that implements the common pattern of "return existing image if known, or allocate a new image otherwise"
bundles/org.eclipse.jface/src/org/eclipse/jface/resource/DeviceResourceDescriptor.java
/**
     * Creates the resource described by this descriptor
     * 
     * @since 3.1 
     *
     * @param device the Device on which to allocate the resource
     * @return the newly allocated resource (not null)
     * @throws DeviceResourceException if unable to allocate the resource
     */
    public abstract Object createResource(Device device) throws DeviceResourceException;
    
    /**
     * Undoes everything that was done by a previous call to create(...), given
     * the object that was returned by create(...).
     * 
     * @since 3.1 
     *
     * @param previouslyCreatedObject an object that was returned by an equal 
     * descriptor in a previous call to createResource(...).
     */
    public abstract void destroyResource(Object previouslyCreatedObject);
}