1 11 package org.eclipse.ui.internal.ide.registry; 12 13 import java.util.HashMap ; 14 import java.util.Map ; 15 16 import org.eclipse.core.runtime.Platform; 17 import org.eclipse.jface.resource.ImageDescriptor; 18 19 22 23 public class ProjectImageRegistry { 24 private Map map = new HashMap (10); 25 26 30 public ImageDescriptor getNatureImage(String natureId) { 31 return (ImageDescriptor) map.get(natureId); 32 } 33 34 37 public void load() { 38 ProjectImageRegistryReader reader = new ProjectImageRegistryReader(); 39 reader.readProjectNatureImages(Platform.getExtensionRegistry(), this); 40 } 41 42 45 public void setNatureImage(String natureId, ImageDescriptor image) { 46 map.put(natureId, image); 47 } 48 } 49 | Popular Tags |