Changeset 6615 in josm for trunk/src/org/openstreetmap/josm/plugins
- Timestamp:
- 2014-01-03T19:32:18+01:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/plugins
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/plugins/Plugin.java
r6380 r6615 144 144 File pluginDir = Main.pref.getPluginsDirectory(); 145 145 File pluginJar = new File(pluginDir, info.name + ".jar"); 146 final URL pluginJarUrl = PluginInformation.fileToURL(pluginJar);146 final URL pluginJarUrl = Utils.fileToURL(pluginJar); 147 147 return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() { 148 148 public ClassLoader run() { -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r6544 r6615 527 527 File pluginJar = new File(pluginDir, info.name + ".jar"); 528 528 I18n.addTexts(pluginJar); 529 URL pluginJarUrl = PluginInformation.fileToURL(pluginJar);529 URL pluginJarUrl = Utils.fileToURL(pluginJar); 530 530 allPluginLibraries.add(pluginJarUrl); 531 531 } -
trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
r6571 r6615 99 99 throw new PluginException(name, tr("The plugin file ''{0}'' does not include a Manifest.", file.toString())); 100 100 scanManifest(manifest, false); 101 libraries.add(0, fileToURL(file));101 libraries.add(0, Utils.fileToURL(file)); 102 102 } catch (IOException e) { 103 103 throw new PluginException(name, e); … … 206 206 } 207 207 } else { 208 //noinspection NullArgumentToVariableArgMethod 209 s = MessageFormat.format(s, null); 208 s = MessageFormat.format(s, (Object[]) null); 210 209 } 211 210 description = s; … … 263 262 } 264 263 265 libraries.add( fileToURL(entryFile));264 libraries.add(Utils.fileToURL(entryFile)); 266 265 } 267 266 } … … 333 332 } 334 333 335 public static URL fileToURL(File f) { 336 try { 337 return f.toURI().toURL(); 338 } catch (MalformedURLException ex) { 339 return null; 340 } 341 } 334 342 335 343 336 /** … … 395 388 } 396 389 390 /** 391 * Returns all possible plugin locations. 392 * @return all possible plugin locations. 393 */ 397 394 public static Collection<String> getPluginLocations() { 398 395 Collection<String> locations = Main.pref.getAllPossiblePreferenceDirs(); … … 462 459 463 460 /** 464 * Replies the name of the plugin 461 * Replies the name of the plugin. 462 * @return The plugin name 465 463 */ 466 464 public String getName() {
Note:
See TracChangeset
for help on using the changeset viewer.