- Timestamp:
- 2016-04-01T15:40:44+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r10055 r10093 52 52 import org.openstreetmap.josm.data.CustomConfigurator; 53 53 import org.openstreetmap.josm.data.Version; 54 import org.openstreetmap.josm.gui.SplashScreen.SplashProgressMonitor; 54 55 import org.openstreetmap.josm.gui.download.DownloadDialog; 55 56 import org.openstreetmap.josm.gui.preferences.server.OAuthAccessTokenHolder; … … 446 447 Collection<PluginInformation> pluginsToLoad = null; 447 448 448 449 449 if (!skipLoadingPlugins) { 450 pluginsToLoad = PluginHandler.buildListOfPluginsToLoad(splash, monitor.createSubTaskMonitor(1, false)); 451 if (!pluginsToLoad.isEmpty() && PluginHandler.checkAndConfirmPluginUpdate(splash)) { 452 monitor.subTask(tr("Updating plugins")); 453 pluginsToLoad = PluginHandler.updatePlugins(splash, null, monitor.createSubTaskMonitor(1, false), false); 454 } 455 456 monitor.indeterminateSubTask(tr("Installing updated plugins")); 457 PluginHandler.installDownloadedPlugins(true); 458 459 monitor.indeterminateSubTask(tr("Loading early plugins")); 460 PluginHandler.loadEarlyPlugins(splash, pluginsToLoad, monitor.createSubTaskMonitor(1, false)); 450 pluginsToLoad = updateAndLoadEarlyPlugins(splash, monitor); 461 451 } 462 452 … … 468 458 469 459 if (!skipLoadingPlugins) { 470 monitor.indeterminateSubTask(tr("Loading plugins")); 471 PluginHandler.loadLatePlugins(splash, pluginsToLoad, monitor.createSubTaskMonitor(1, false)); 472 toolbar.refreshToolbarControl(); 460 loadLatePlugins(splash, monitor, pluginsToLoad); 473 461 } 474 462 … … 525 513 RepaintManager.setCurrentManager(new CheckThreadViolationRepaintManager()); 526 514 } 515 } 516 517 static Collection<PluginInformation> updateAndLoadEarlyPlugins(SplashScreen splash, SplashProgressMonitor monitor) { 518 Collection<PluginInformation> pluginsToLoad; 519 pluginsToLoad = PluginHandler.buildListOfPluginsToLoad(splash, monitor.createSubTaskMonitor(1, false)); 520 if (!pluginsToLoad.isEmpty() && PluginHandler.checkAndConfirmPluginUpdate(splash)) { 521 monitor.subTask(tr("Updating plugins")); 522 pluginsToLoad = PluginHandler.updatePlugins(splash, null, monitor.createSubTaskMonitor(1, false), false); 523 } 524 525 monitor.indeterminateSubTask(tr("Installing updated plugins")); 526 PluginHandler.installDownloadedPlugins(true); 527 528 monitor.indeterminateSubTask(tr("Loading early plugins")); 529 PluginHandler.loadEarlyPlugins(splash, pluginsToLoad, monitor.createSubTaskMonitor(1, false)); 530 return pluginsToLoad; 531 } 532 533 static void loadLatePlugins(SplashScreen splash, SplashProgressMonitor monitor, Collection<PluginInformation> pluginsToLoad) { 534 monitor.indeterminateSubTask(tr("Loading plugins")); 535 PluginHandler.loadLatePlugins(splash, pluginsToLoad, monitor.createSubTaskMonitor(1, false)); 536 toolbar.refreshToolbarControl(); 527 537 } 528 538 -
trunk/src/org/openstreetmap/josm/gui/SplashScreen.java
r9543 r10093 197 197 private SplashProgressMonitor latestSubtask; 198 198 199 /** 200 * Constructs a new {@code SplashProgressMonitor}. 201 * @param name name 202 * @param listener change listener 203 */ 199 204 public SplashProgressMonitor(String name, ChangeListener listener) { 200 205 this.name = name; -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r10001 r10093 8 8 import java.awt.Component; 9 9 import java.awt.Font; 10 import java.awt.GraphicsEnvironment; 10 11 import java.awt.GridBagConstraints; 11 12 import java.awt.GridBagLayout; … … 276 277 * @param plugins the collection of plugins 277 278 */ 278 privatestatic void filterDeprecatedPlugins(Component parent, Collection<String> plugins) {279 static void filterDeprecatedPlugins(Component parent, Collection<String> plugins) { 279 280 Set<DeprecatedPlugin> removedPlugins = new TreeSet<>(); 280 281 for (DeprecatedPlugin depr : DEPRECATED_PLUGINS) { … … 305 306 } 306 307 sb.append("</ul></html>"); 307 JOptionPane.showMessageDialog( 308 parent, 309 sb.toString(), 310 tr("Warning"), 311 JOptionPane.WARNING_MESSAGE 312 ); 308 if (!GraphicsEnvironment.isHeadless()) { 309 JOptionPane.showMessageDialog( 310 parent, 311 sb.toString(), 312 tr("Warning"), 313 JOptionPane.WARNING_MESSAGE 314 ); 315 } 313 316 } 314 317 … … 323 326 * @param plugins the collection of plugins 324 327 */ 325 privatestatic void filterUnmaintainedPlugins(Component parent, Collection<String> plugins) {328 static void filterUnmaintainedPlugins(Component parent, Collection<String> plugins) { 326 329 for (String unmaintained : UNMAINTAINED_PLUGINS) { 327 330 if (!plugins.contains(unmaintained)) {
Note:
See TracChangeset
for help on using the changeset viewer.