Changeset 6883 in josm for trunk/src/org/openstreetmap/josm/plugins
- Timestamp:
- 2014-02-25T01:31:24+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/PluginDownloadTask.java
r6867 r6883 90 90 } 91 91 92 @Override protected void cancel() { 92 @Override 93 protected void cancel() { 93 94 this.canceled = true; 94 95 synchronized(this) { … … 99 100 } 100 101 101 @Override protected void finish() {} 102 @Override 103 protected void finish() {} 102 104 103 105 protected void download(PluginInformation pi, File file) throws PluginDownloadException{ … … 152 154 } 153 155 154 @Override protected void realRun() throws SAXException, IOException { 156 @Override 157 protected void realRun() throws SAXException, IOException { 155 158 File pluginDir = Main.pref.getPluginsDirectory(); 156 if (!pluginDir.exists()) { 157 if (!pluginDir.mkdirs()) { 158 lastException = new PluginDownloadException(tr("Failed to create plugin directory ''{0}''", pluginDir.toString())); 159 failed.addAll(toUpdate); 160 return; 161 } 159 if (!pluginDir.exists() && !pluginDir.mkdirs()) { 160 lastException = new PluginDownloadException(tr("Failed to create plugin directory ''{0}''", pluginDir.toString())); 161 failed.addAll(toUpdate); 162 return; 162 163 } 163 164 getProgressMonitor().setTicksCount(toUpdate.size()); -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r6839 r6883 78 78 * Deprecated plugins that are removed on start 79 79 */ 80 public final staticCollection<DeprecatedPlugin> DEPRECATED_PLUGINS;80 public static final Collection<DeprecatedPlugin> DEPRECATED_PLUGINS; 81 81 static { 82 82 String IN_CORE = tr("integrated into main program"); … … 195 195 * All installed and loaded plugins (resp. their main classes) 196 196 */ 197 public final staticCollection<PluginProxy> pluginList = new LinkedList<PluginProxy>();197 public static final Collection<PluginProxy> pluginList = new LinkedList<PluginProxy>(); 198 198 199 199 /** … … 1035 1035 File plugin = new File(filePath.substring(0, filePath.length() - 4)); 1036 1036 String pluginName = updatedPlugin.getName().substring(0, updatedPlugin.getName().length() - 8); 1037 if (plugin.exists()) { 1038 if (!plugin.delete() && dowarn) { 1039 Main.warn(tr("Failed to delete outdated plugin ''{0}''.", plugin.toString())); 1040 Main.warn(tr("Failed to install already downloaded plugin ''{0}''. Skipping installation. JOSM is still going to load the old plugin version.", pluginName)); 1041 continue; 1042 } 1037 if (plugin.exists() && !plugin.delete() && dowarn) { 1038 Main.warn(tr("Failed to delete outdated plugin ''{0}''.", plugin.toString())); 1039 Main.warn(tr("Failed to install already downloaded plugin ''{0}''. Skipping installation. JOSM is still going to load the old plugin version.", pluginName)); 1040 continue; 1043 1041 } 1044 1042 try { … … 1324 1322 } 1325 1323 1326 static privateclass UpdatePluginsMessagePanel extends JPanel {1324 private static class UpdatePluginsMessagePanel extends JPanel { 1327 1325 private JMultilineLabel lblMessage; 1328 1326 private JCheckBox cbDontShowAgain; -
trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
r6839 r6883 325 325 try { 326 326 File pluginDir = Main.pref.getPluginsDirectory(); 327 if (!pluginDir.exists()) { 328 if (! pluginDir.mkdirs()) { 329 Main.warn(tr("Failed to create plugin directory ''{0}''. Cannot cache plugin list from plugin site ''{1}''.", pluginDir.toString(), site)); 330 } 327 if (!pluginDir.exists() && !pluginDir.mkdirs()) { 328 Main.warn(tr("Failed to create plugin directory ''{0}''. Cannot cache plugin list from plugin site ''{1}''.", pluginDir.toString(), site)); 331 329 } 332 330 File cacheFile = createSiteCacheFile(pluginDir, site, CacheType.PLUGIN_LIST);
Note:
See TracChangeset
for help on using the changeset viewer.