Project: Eclipse_Platform_UI
Bug 79909 [JFace] Localized resource registries for JFace
Reported: 2004-12-01 13:31:09 | Status: verified fixed

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.

Files changed in fix:
bundles/org.eclipse.jface/src/org/eclipse/jface/resource/AbstractResourceManager.java bundles/org.eclipse.jface/src/org/eclipse/jface/resource/ArrayFontDescriptor.java bundles/org.eclipse.jface/src/org/eclipse/jface/resource/ColorDescriptor.java bundles/org.eclipse.jface/src/org/eclipse/jface/resource/ColorRegistry.java bundles/org.eclipse.jface/src/org/eclipse/jface/resource/DeviceResourceDescriptor.java bundles/org.eclipse.jface/src/org/eclipse/jface/resource/DeviceResourceException.java bundles/org.eclipse.jface/src/org/eclipse/jface/resource/DeviceResourceManager.java bundles/org.eclipse.jface/src/org/eclipse/jface/resource/FontDescriptor.java bundles/org.eclipse.jface/src/org/eclipse/jface/resource/ImageDataImageDescriptor.java bundles/org.eclipse.jface/src/org/eclipse/jface/resource/ImageDescriptor.java bundles/org.eclipse.jface/src/org/eclipse/jface/resource/ImageRegistry.java bundles/org.eclipse.jface/src/org/eclipse/jface/resource/JFaceResources.java bundles/org.eclipse.jface/src/org/eclipse/jface/resource/LocalResourceManager.java bundles/org.eclipse.jface/src/org/eclipse/jface/resource/NamedFontDescriptor.java bundles/org.eclipse.jface/src/org/eclipse/jface/resource/RGBColorDescriptor.java bundles/org.eclipse.jface/src/org/eclipse/jface/resource/ResourceManager.java bundles/org.eclipse.jface/src/org/eclipse/jface/wizard/Wizard.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/bookmarkexplorer/BookmarkLabelProvider.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/WorkbenchPart.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/images/AllTests.java tests/org.eclipse.ui.tests/Eclipse JFace Tests/org/eclipse/jface/tests/images/ResourceManagerTest.java