- Timestamp:
- 2009-10-12T08:04:09+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r2270 r2278 13 13 import java.util.Collection; 14 14 import java.util.Collections; 15 import java.util.HashMap; 15 16 import java.util.LinkedList; 16 17 import java.util.List; 18 import java.util.Map; 17 19 import java.util.SortedMap; 18 20 import java.util.TreeMap; … … 40 42 41 43 public class PluginHandler { 44 42 45 /** 43 46 * All installed and loaded plugins (resp. their main classes) … … 63 66 "namefinder", "waypoints", "slippy_map_chooser", "tcx-support"}; 64 67 String [] unmaintained = new String[] {"gpsbabelgui", "Intersect_way"}; 68 Map<String, Integer> requiredUpdate = new HashMap<String, Integer>(); 69 requiredUpdate.put("validator", 18092); 70 65 71 for (String p : oldplugins) { 66 72 if (plugins.contains(p)) { … … 79 85 for (String p : unmaintained) { 80 86 if (plugins.contains(p) && disablePlugin(tr("<html>Loading of {0} plugin was requested." 81 +"<br>This plugin is no longer developed and very likely will produce errors."82 +"<br>It should be disabled.<br>Delete from preferences?</html>", p), p))87 +"<br>This plugin is no longer developed and very likely will produce errors." 88 +"<br>It should be disabled.<br>Delete from preferences?</html>", p), p)) { 83 89 plugins.remove(p); 84 } 85 } 90 } 91 } 92 } 93 86 94 87 95 if (plugins.isEmpty()) … … 105 113 continue; 106 114 } 115 if (requiredUpdate.containsKey(info.name)) { 116 int minimumVersion = requiredUpdate.get(info.name); 117 boolean badVersion; 118 try { 119 badVersion = Integer.parseInt(info.version) < minimumVersion; 120 } catch (NumberFormatException e) { 121 badVersion = true; 122 } 123 if (badVersion) { 124 JOptionPane.showMessageDialog( 125 Main.parent, 126 tr("Plugin {0} version {1} found but for this version of JOSM is at least version {2} required. " 127 + "Please update the plugin.", info.name, info.version, String.valueOf(minimumVersion)), 128 tr("Warning"), 129 JOptionPane.WARNING_MESSAGE 130 ); 131 continue; 132 } 133 } 134 107 135 if(info.requires != null) 108 136 { … … 252 280 if (plugin == null) 253 281 { 254 String name = null;255 282 /** 256 283 * Analyze the stack of the argument and find a name of a plugin, if … … 271 298 } 272 299 } 273 if(plugin != null) 300 if(plugin != null) { 274 301 break; 302 } 275 303 } 276 304 }
Note:
See TracChangeset
for help on using the changeset viewer.