Changeset 3874 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2011-02-09T09:53:35+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r3862 r3874 24 24 import java.util.Collection; 25 25 import java.util.HashMap; 26 import java.util.LinkedList;27 import java.util.List;28 26 import java.util.Map; 29 27 import java.util.zip.ZipEntry; … … 36 34 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 37 35 import org.openstreetmap.josm.io.MirroredInputStream; 36 import org.openstreetmap.josm.plugins.PluginHandler; 38 37 39 38 /** … … 68 67 */ 69 68 private static Map<String, ImageWrapper> cache = new HashMap<String, ImageWrapper>(); 70 71 /**72 * Add here all ClassLoader whose resource should be searched. Plugin's class loaders are added73 * by main.74 */75 public static final List<ClassLoader> sources = new LinkedList<ClassLoader>();76 69 77 70 /** … … 234 227 if (path.startsWith("resource://")) { 235 228 String p = path.substring("resource://".length()); 236 for (ClassLoader source : sources) {229 for (ClassLoader source : PluginHandler.getResourceClassLoaders()) { 237 230 URL res; 238 231 if ((res = source.getResource(p + name)) != null) … … 355 348 } 356 349 357 static {358 try {359 sources.add(ClassLoader.getSystemClassLoader());360 sources.add(org.openstreetmap.josm.gui.MainApplication.class.getClassLoader());361 } catch (SecurityException ex) {362 sources.add(ImageProvider.class.getClassLoader());363 }364 }365 366 350 /* 367 351 * from: http://www.jidesoft.com/blog/2008/02/29/rotate-an-icon-in-java/ License:
Note:
See TracChangeset
for help on using the changeset viewer.