- Timestamp:
- 2010-03-05T17:07:49+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java
r3086 r3088 328 328 public void actionPerformed(ActionEvent e) { 329 329 List<PluginInformation> toUpdate = model.getSelectedPlugins(); 330 final PluginDownloadTask task = new PluginDownloadTask( 330 // the async task for downloading plugins 331 final PluginDownloadTask pluginDownloadTask = new PluginDownloadTask( 331 332 pnlPluginPreferences, 332 333 toUpdate, 333 334 tr("Update plugins") 334 335 ); 335 336 final ReadRemotePluginInformationTask task2 = new ReadRemotePluginInformationTask(Main.pref.getPluginSites()); 337 338 final Runnable r2 = new Runnable() { 336 // the async task for downloading plugin information 337 final ReadRemotePluginInformationTask pluginInfoDownloadTask = new ReadRemotePluginInformationTask(Main.pref.getPluginSites()); 338 339 // to be run asynchronously after the plugin download 340 // 341 final Runnable pluginDownloadContinuation = new Runnable() { 339 342 public void run() { 340 if ( task2.isCanceled())343 if (pluginDownloadTask.isCanceled()) 341 344 return; 342 notifyDownloadResults( task);343 model.refreshLocalPluginVersion( task.getDownloadedPlugins());345 notifyDownloadResults(pluginDownloadTask); 346 model.refreshLocalPluginVersion(pluginDownloadTask.getDownloadedPlugins()); 344 347 pnlPluginPreferences.refreshView(); 345 348 } 346 349 }; 347 350 348 final Runnable r1 = new Runnable() { 351 // to be run asynchronously after the plugin list download 352 // 353 final Runnable pluginInfoDownloadContinuation = new Runnable() { 349 354 public void run() { 350 if ( task.isCanceled())355 if (pluginInfoDownloadTask.isCanceled()) 351 356 return; 352 Main.worker.submit( task2);353 Main.worker.submit( r2);357 Main.worker.submit(pluginDownloadTask); 358 Main.worker.submit(pluginDownloadContinuation); 354 359 } 355 360 }; 356 361 357 Main.worker.submit( task);358 Main.worker.submit( r1);362 Main.worker.submit(pluginInfoDownloadTask); 363 Main.worker.submit(pluginInfoDownloadContinuation); 359 364 } 360 365 }
Note:
See TracChangeset
for help on using the changeset viewer.