Changeset 10768 in josm for trunk/src/org/openstreetmap/josm/plugins
- Timestamp:
- 2016-08-08T00:23:04+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r10708 r10768 975 975 976 976 // try to download the plugin lists 977 //978 977 ReadRemotePluginInformationTask task1 = new ReadRemotePluginInformationTask( 979 978 monitor.createSubTaskMonitor(1, false), … … 981 980 ); 982 981 task1.run(); 983 List<PluginInformation> allPlugins = null;982 List<PluginInformation> allPlugins = task1.getAvailablePlugins(); 984 983 985 984 try { 986 allPlugins = task1.getAvailablePlugins();987 985 plugins = buildListOfPluginsToLoad(parent, monitor.createSubTaskMonitor(1, false)); 988 986 // If only some plugins have to be updated, filter the list … … 1009 1007 1010 1008 // filter plugins which actually have to be updated 1011 //1012 1009 Collection<PluginInformation> pluginsToUpdate = new ArrayList<>(); 1013 for (PluginInformation pi: plugins) { 1014 if (pi.isUpdateRequired()) { 1015 pluginsToUpdate.add(pi); 1010 if (plugins != null) { 1011 for (PluginInformation pi: plugins) { 1012 if (pi.isUpdateRequired()) { 1013 pluginsToUpdate.add(pi); 1014 } 1016 1015 } 1017 1016 } … … 1030 1029 while (!additionalPlugins.isEmpty()) { 1031 1030 // Install the additional plugins to load them later 1032 plugins.addAll(additionalPlugins); 1031 if (plugins != null) 1032 plugins.addAll(additionalPlugins); 1033 1033 additionalPlugins = findRequiredPluginsToDownload(additionalPlugins, allPlugins, pluginsToDownload); 1034 1034 pluginsToDownload.addAll(additionalPlugins); … … 1037 1037 1038 1038 // try to update the locally installed plugins 1039 //1040 1039 pluginDownloadTask = new PluginDownloadTask( 1041 1040 monitor.createSubTaskMonitor(1, false), … … 1053 1052 1054 1053 // Update Plugin info for downloaded plugins 1055 //1056 1054 refreshLocalUpdatedPluginInfo(pluginDownloadTask.getDownloadedPlugins()); 1057 1055 1058 1056 // notify user if downloading a locally installed plugin failed 1059 //1060 1057 if (!pluginDownloadTask.getFailedPlugins().isEmpty()) { 1061 1058 alertFailedPluginUpdate(parent, pluginDownloadTask.getFailedPlugins()); … … 1068 1065 if (pluginsWanted == null) { 1069 1066 // if all plugins updated, remember the update because it was successful 1070 //1071 1067 Main.pref.putInteger("pluginmanager.version", Version.getInstance().getVersion()); 1072 1068 Main.pref.put("pluginmanager.lastupdate", Long.toString(System.currentTimeMillis()));
Note:
See TracChangeset
for help on using the changeset viewer.