Changeset 31752 in osm
- Timestamp:
- 2015-11-16T01:43:15+01:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/geotools
- Files:
-
- 6 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/geotools/.classpath
r31742 r31752 72 72 <classpathentry exported="true" kind="lib" path="lib/jdom-1.1.3.jar"/> 73 73 <classpathentry exported="true" kind="lib" path="lib/jsr-275-1.0-beta-2.jar"/> 74 <classpathentry exported="true" kind="lib" path="lib/jt-colorconvert-1.0.6.jar"/> 74 75 <classpathentry exported="true" kind="lib" path="lib/jt-contour-1.4.0.jar"/> 75 76 <classpathentry exported="true" kind="lib" path="lib/jt-rangelookup-1.4.0.jar"/> 77 <classpathentry exported="true" kind="lib" path="lib/jt-stats-1.0.6.jar"/> 78 <classpathentry exported="true" kind="lib" path="lib/jt-utilities-1.0.6.jar"/> 76 79 <classpathentry exported="true" kind="lib" path="lib/jt-utils-1.4.0.jar"/> 77 80 <classpathentry exported="true" kind="lib" path="lib/jt-vectorbinarize-1.4.0.jar"/> 78 81 <classpathentry exported="true" kind="lib" path="lib/jt-vectorize-1.4.0.jar"/> 82 <classpathentry exported="true" kind="lib" path="lib/jt-warp-1.0.6.jar"/> 83 <classpathentry exported="true" kind="lib" path="lib/jt-zonal-1.0.6.jar"/> 79 84 <classpathentry exported="true" kind="lib" path="lib/jt-zonalstats-1.4.0.jar"/> 80 85 <classpathentry combineaccessrules="false" kind="src" path="/JOSM-jts"/> -
applications/editors/josm/plugins/geotools/src/org/openstreetmap/josm/plugins/geotools/GeoToolsPlugin.java
r30755 r31752 4 4 import java.io.IOException; 5 5 import java.io.InputStream; 6 import java.util.Iterator; 7 import java.util.ServiceLoader; 6 8 9 import javax.imageio.spi.IIORegistry; 10 import javax.imageio.spi.IIOServiceProvider; 7 11 import javax.media.jai.JAI; 8 12 import javax.media.jai.OperationRegistry; … … 13 17 import org.openstreetmap.josm.Main; 14 18 import org.openstreetmap.josm.plugins.Plugin; 19 import org.openstreetmap.josm.plugins.PluginHandler; 15 20 import org.openstreetmap.josm.plugins.PluginInformation; 16 21 … … 65 70 } 66 71 } 72 73 // Manual registering because plugin jar is not on application classpath 74 IIORegistry ioRegistry = IIORegistry.getDefaultInstance(); 75 ClassLoader loader = PluginHandler.getPluginClassLoader(); 76 77 Iterator<Class<?>> categories = ioRegistry.getCategories(); 78 while (categories.hasNext()) { 79 @SuppressWarnings("unchecked") 80 Iterator<IIOServiceProvider> riter = ServiceLoader.load((Class<IIOServiceProvider>)categories.next(), loader).iterator(); 81 while (riter.hasNext()) { 82 ioRegistry.registerServiceProvider(riter.next()); 83 } 84 } 67 85 } 68 86
Note:
See TracChangeset
for help on using the changeset viewer.