Changeset 5468 in josm for trunk/src


Ignore:
Timestamp:
2012-08-21T21:40:47+02:00 (12 years ago)
Author:
jttt
Message:

EDT violation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java

    r5140 r5468  
    5959        }
    6060    }
    61    
     61
    6262    private PluginPreference() {
    6363        super("plugin", tr("Plugins"), tr("Configure available plugins."));
     
    7474                    downloaded.size(),
    7575                    downloaded.size()
    76             ));
     76                    ));
    7777            sb.append("<ul>");
    7878            for(PluginInformation pi: downloaded) {
     
    8787                    failed.size(),
    8888                    failed.size()
    89             ));
     89                    ));
    9090            sb.append("<ul>");
    9191            for(PluginInformation pi: failed) {
     
    156156                    }
    157157                }
    158         );
     158                );
    159159
    160160        pnl.add(spPluginPreferences, BorderLayout.CENTER);
     
    194194                        tr("Accept the new plugin sites and close the dialog"),
    195195                        null /* no special help topic */
    196                 ),
    197                 new ButtonSpec(
    198                         tr("Cancel"),
    199                         ImageProvider.get("cancel"),
    200                         tr("Close the dialog"),
    201                         null /* no special help topic */
    202                 )
     196                        ),
     197                        new ButtonSpec(
     198                                tr("Cancel"),
     199                                ImageProvider.get("cancel"),
     200                                tr("Close the dialog"),
     201                                null /* no special help topic */
     202                                )
    203203        };
    204204        PluginConfigurationSitesPanel pnl = new PluginConfigurationSitesPanel();
     
    213213                options[0],
    214214                null /* no help topic */
    215         );
     215                );
    216216        if (answer != 0 /* OK */)
    217217            return;
     
    323323                    !failed.isEmpty() ? JOptionPane.WARNING_MESSAGE : JOptionPane.INFORMATION_MESSAGE,
    324324                            HelpUtil.ht("/Preferences/Plugins")
    325             );
     325                    );
    326326        }
    327327
    328328        protected void alertNothingToUpdate() {
    329             HelpAwareOptionPane.showOptionDialog(
    330                     pnlPluginPreferences,
    331                     tr("All installed plugins are up to date. JOSM does not have to download newer versions."),
    332                     tr("Plugins up to date"),
    333                     JOptionPane.INFORMATION_MESSAGE,
    334                     null // FIXME: provide help context
    335             );
     329            try {
     330                SwingUtilities.invokeAndWait(new Runnable() {
     331                    public void run() {
     332                        HelpAwareOptionPane.showOptionDialog(
     333                                pnlPluginPreferences,
     334                                tr("All installed plugins are up to date. JOSM does not have to download newer versions."),
     335                                tr("Plugins up to date"),
     336                                JOptionPane.INFORMATION_MESSAGE,
     337                                null // FIXME: provide help context
     338                                );
     339                    };
     340                });
     341            } catch (Exception e) {
     342                e.printStackTrace();
     343            }
    336344        }
    337345
     
    343351                    toUpdate,
    344352                    tr("Update plugins")
    345             );
     353                    );
    346354            // the async task for downloading plugin information
    347355            final ReadRemotePluginInformationTask pluginInfoDownloadTask = new ReadRemotePluginInformationTask(Main.pref.getPluginSites());
     
    456464                            tr("Enter URL"),
    457465                            JOptionPane.QUESTION_MESSAGE
    458                     );
     466                            );
    459467                    if (s != null) {
    460468                        model.addElement(s);
     
    470478                                tr("Warning"),
    471479                                JOptionPane.WARNING_MESSAGE
    472                         );
     480                                );
    473481                        return;
    474482                    }
     
    481489                            null,
    482490                            list.getSelectedValue()
    483                     );
     491                            );
    484492                    if (s != null) {
    485493                        model.setElementAt(s, list.getSelectedIndex());
     
    495503                                tr("Warning"),
    496504                                JOptionPane.WARNING_MESSAGE
    497                         );
     505                                );
    498506                        return;
    499507                    }
Note: See TracChangeset for help on using the changeset viewer.