Bug 79909 [JFace] Localized resource registries for JFace
Please provide improved JFace support for managing SWT resources, with the following properties: - A registry can allocate and deallocate SWT resources given a descriptor - Resources are reference-counted and shared, allowing different objects with equivalent descriptors to share resources. - Everything in the registry can be deallocated with one function call - The registry should support an open-ended set of resources (and should initially support, at minimum, Images, Fonts, Colors) - It should be possible to create a "local registry" that behaves like a regular registry but actually shares its resources with a global registry. For example, the workbench could offer a local registry as a service to views and editors. This would allow views and editors to safely allocate and deallocate SWT resources without any chance of leaking.
bundles/org.eclipse.jface/src/org/eclipse/jface/resource/ColorRegistry.java
* 
     * @param symbolicName the symbolic color name.
     * @param rgb the <code>RGB</code> data for the color.
     * @return the new <code>Color</code> object.
     */
    private Color createColor(String symbolicName, RGB rgb) {
        return new Color(display, rgb);
    }
    /**
     * Dispose of all of the <code>Color</code>s in this iterator.
     * 
     * @param Iterator over <code>Collection</code> of <code>Color</code>
     */
    private void disposeColors(Iterator iterator) {
        while (iterator.hasNext()) {
            Object next = iterator.next();
            ((Color) next).dispose();
        }
    }
    /**
     * Returns the <code>color</code> associated with the given symbolic color 
     * name, or <code>null</code> if no such definition exists.
     * 
     * @param symbolicName symbolic color name
     * @return the <code>Color</code> or <code>null</code>
     */
    public Color get(String symbolicName) {
        Assert.isNotNull(symbolicName);
        Object result = stringToColor.get(symbolicName);
        if (result != null)