Changeset 8938 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2015-10-24T14:58:06+02:00 (9 years ago)
Author:
Don-vip
Message:

add new unit test to check that all available plugins can be loaded

Location:
trunk/src/org/openstreetmap/josm/plugins
Files:
2 edited

Legend:

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

    r8855 r8938  
    162162        for (PluginInformation d : toUpdate) {
    163163            if (canceled) return;
    164             progressMonitor.subTask(tr("Downloading Plugin {0}...", d.name));
     164            String message = tr("Downloading Plugin {0}...", d.name);
     165            Main.info(message);
     166            progressMonitor.subTask(message);
    165167            progressMonitor.worked(1);
    166168            File pluginFile = new File(pluginDir, d.name + ".jar.new");
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r8928 r8938  
    232232
    233233    /**
     234     * All exceptions that occured during plugin loading
     235     * @since 8938
     236     */
     237    public static final Map<String, Exception> pluginLoadingExceptions = new HashMap<>();
     238
     239    /**
    234240     * Global plugin ClassLoader.
    235241     */
     
    279285        // notify user about removed deprecated plugins
    280286        //
    281         StringBuilder sb = new StringBuilder();
     287        StringBuilder sb = new StringBuilder(32);
    282288        sb.append("<html>")
    283289          .append(trn(
     
    308314     *
    309315     * Asks the user for every unmaintained plugin whether it should be removed.
     316     * @param parent The parent Component used to display warning popup
    310317     *
    311318     * @param plugins the collection of plugins
     
    316323                continue;
    317324            }
    318             String msg =  tr("<html>Loading of the plugin \"{0}\" was requested."
     325            String msg = tr("<html>Loading of the plugin \"{0}\" was requested."
    319326                    + "<br>This plugin is no longer developed and very likely will produce errors."
    320327                    +"<br>It should be disabled.<br>Delete from preferences?</html>", unmaintained);
     
    702709            msg = null;
    703710        } catch (PluginException e) {
     711            pluginLoadingExceptions.put(plugin.name, e);
    704712            Main.error(e);
    705713            if (e.getCause() instanceof ClassNotFoundException) {
     
    708716            }
    709717        }  catch (Exception e) {
     718            pluginLoadingExceptions.put(plugin.name, e);
    710719            Main.error(e);
    711720        }
     
    14491458    }
    14501459
     1460    /**
     1461     * Returns the set of deprecated and unmaintained plugins.
     1462     * @return set of deprecated and unmaintained plugins names.
     1463     * @since 8938
     1464     */
     1465    public static Set<String> getDeprecatedAndUnmaintainedPlugins() {
     1466        Set<String> result = new HashSet<>(DEPRECATED_PLUGINS.size() + UNMAINTAINED_PLUGINS.length);
     1467        for (DeprecatedPlugin dp : DEPRECATED_PLUGINS) {
     1468            result.add(dp.name);
     1469        }
     1470        result.addAll(Arrays.asList(UNMAINTAINED_PLUGINS));
     1471        return result;
     1472    }
     1473
    14511474    private static class UpdatePluginsMessagePanel extends JPanel {
    14521475        private JMultilineLabel lblMessage;
Note: See TracChangeset for help on using the changeset viewer.