pnlPluginPreferences,
toUpdate,
tr("Update plugins")
);
// the async task for downloading plugin information
final ReadRemotePluginInformationTask pluginInfoDownloadTask = new ReadRemotePluginInformationTask(Main.pref.getPluginSites());
// to be run asynchronously after the plugin download
//
final Runnable pluginDownloadContinuation = new Runnable() {
@Override
public void run() {
if (pluginDownloadTask.isCanceled())
return;
notifyDownloadResults(pnlPluginPreferences, pluginDownloadTask);
model.refreshLocalPluginVersion(pluginDownloadTask.getDownloadedPlugins());
model.clearPendingPlugins(pluginDownloadTask.getDownloadedPlugins());
GuiHelper.runInEDT(new Runnable() {
@Override
public void run() {
pnlPluginPreferences.refreshView(); }
});
}
};
// to be run asynchronously after the plugin list download
//
final Runnable pluginInfoDownloadContinuation = new Runnable() {
@Override
public void run() {
if (pluginInfoDownloadTask.isCanceled())
return;
model.updateAvailablePlugins(pluginInfoDownloadTask.getAvailablePlugins());
// select plugins which actually have to be updated
//
Iterator<PluginInformation> it = toUpdate.iterator();
while(it.hasNext()) {
PluginInformation pi = it.next();