Ignore:
Timestamp:
2017-08-24T15:54:00+02:00 (2 years ago)
Author:
Don-vip
Message:

see #15182 - deprecate Main.worker, replace it by gui.MainApplication.worker + code refactoring to make sure only editor packages use it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r12627 r12634  
    5757import org.openstreetmap.josm.gui.HelpAwareOptionPane;
    5858import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec;
     59import org.openstreetmap.josm.gui.MainApplication;
    5960import org.openstreetmap.josm.gui.download.DownloadSelection;
    6061import org.openstreetmap.josm.gui.preferences.PreferenceSettingFactory;
     
    590591        final ReadRemotePluginInformationTask pluginInfoDownloadTask = new ReadRemotePluginInformationTask(
    591592                Main.pref.getOnlinePluginSites());
    592         Main.worker.submit(pluginInfoDownloadTask);
     593        MainApplication.worker.submit(pluginInfoDownloadTask);
    593594
    594595        // Continuation
    595         Main.worker.submit(() -> {
     596        MainApplication.worker.submit(() -> {
    596597            // Build list of plugins to download
    597598            Set<PluginInformation> toDownload = new HashSet<>(pluginInfoDownloadTask.getAvailablePlugins());
     
    601602                // download plugins
    602603                final PluginDownloadTask task = new PluginDownloadTask(parent, toDownload, tr("Download plugins"));
    603                 Main.worker.submit(task);
    604                 Main.worker.submit(() -> {
     604                MainApplication.worker.submit(task);
     605                MainApplication.worker.submit(() -> {
    605606                    // restart if some plugins have been downloaded
    606607                    if (!task.getDownloadedPlugins().isEmpty()) {
Note: See TracChangeset for help on using the changeset viewer.