Changeset 3669 in josm for trunk/src/org/openstreetmap/josm/plugins
- Timestamp:
- 2010-11-25T00:07:52+01:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/plugins
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r3487 r3669 28 28 import java.util.Set; 29 29 import java.util.Map.Entry; 30 import java.util.TreeMap; 31 import java.util.TreeSet; 30 32 import java.util.concurrent.ExecutionException; 31 33 import java.util.concurrent.ExecutorService; … … 67 69 public class PluginHandler { 68 70 69 final public static String [] DEPRECATED_PLUGINS = new String[] {"mappaint", "unglueplugin", 70 "lang-de", "lang-en_GB", "lang-fr", "lang-it", "lang-pl", "lang-ro", 71 "lang-ru", "ewmsplugin", "ywms", "tways-0.2", "geotagged", "landsat", 72 "namefinder", "waypoints", "slippy_map_chooser", "tcx-support", "usertools", 73 "AgPifoJ", "utilsplugin", "ghost"}; 71 /* deprecated plugins that are removed on start 72 key - plugin name; value - explanation for deprecation (optional, can be null) */ 73 public final static Map<String, String> DEPRECATED_PLUGINS = new TreeMap<String, String>(); 74 static { 75 String IN_CORE = tr("integrated into main program"); 76 for (String[] depr : new String[][] { 77 {"mappaint"}, {"unglueplugin"}, {"lang-de"}, {"lang-en_GB"}, {"lang-fr"}, 78 {"lang-it"}, {"lang-pl"}, {"lang-ro"}, {"lang-ru"}, {"ewmsplugin"}, 79 {"ywms"}, {"tways-0.2"}, {"geotagged"}, {"landsat"}, {"namefinder"}, 80 {"waypoints"}, {"slippy_map_chooser"}, {"tcx-support"}, {"usertools"}, 81 {"AgPifoJ", IN_CORE}, {"utilsplugin", IN_CORE}, {"ghost"}, 82 {"validator", IN_CORE}}) { 83 DEPRECATED_PLUGINS.put(depr[0], depr.length >= 2 ? depr[1] : null); 84 } 85 } 74 86 75 87 final public static String [] UNMAINTAINED_PLUGINS = new String[] {"gpsbabelgui", "Intersect_way"}; … … 90 102 */ 91 103 private static void filterDeprecatedPlugins(Window parent, Collection<String> plugins) { 92 Set<String> removedPlugins = new HashSet<String>();93 for (String p : DEPRECATED_PLUGINS ) {104 Set<String> removedPlugins = new TreeSet<String>(); 105 for (String p : DEPRECATED_PLUGINS.keySet()) { 94 106 if (plugins.contains(p)) { 95 107 plugins.remove(p); … … 103 115 // notify user about removed deprecated plugins 104 116 // 105 StringBu ffer sb = new StringBuffer();117 StringBuilder sb = new StringBuilder(); 106 118 sb.append("<html>"); 107 119 sb.append(trn( … … 112 124 sb.append("<ul>"); 113 125 for (String name: removedPlugins) { 114 sb.append("<li>").append(name).append("</li>"); 126 sb.append("<li>").append(name); 127 String explanation = DEPRECATED_PLUGINS.get(name); 128 if (explanation != null) { 129 sb.append(" ("+explanation+")"); 130 } 131 sb.append("</li>"); 115 132 } 116 133 sb.append("</ul>"); -
trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java
r3530 r3669 201 201 202 202 protected void filterOldPlugins() { 203 for (String p : PluginHandler.DEPRECATED_PLUGINS ) {203 for (String p : PluginHandler.DEPRECATED_PLUGINS.keySet()) { 204 204 if (canceled)return; 205 205 if (availablePlugins.containsKey(p)) { -
trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
r3479 r3669 295 295 protected List<PluginInformation> filterDeprecatedPlugins(List<PluginInformation> plugins) { 296 296 List<PluginInformation> ret = new ArrayList<PluginInformation>(plugins.size()); 297 HashSet<String> deprecatedPluginNames = new HashSet<String>( Arrays.asList(PluginHandler.DEPRECATED_PLUGINS));297 HashSet<String> deprecatedPluginNames = new HashSet<String>(PluginHandler.DEPRECATED_PLUGINS.keySet()); 298 298 for (PluginInformation plugin: plugins) { 299 299 if (deprecatedPluginNames.contains(plugin.name)) {
Note:
See TracChangeset
for help on using the changeset viewer.