Changeset 6070 in josm for trunk/src/org/openstreetmap/josm/plugins
- Timestamp:
- 2013-07-17T00:01:49+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r6041 r6070 151 151 152 152 final public static String [] UNMAINTAINED_PLUGINS = new String[] {"gpsbabelgui", "Intersect_way"}; 153 153 154 154 /** 155 155 * Default time-based update interval, in days (pluginmanager.time-based-update.interval) … … 425 425 return false; 426 426 } 427 427 428 428 // Add all plugins already loaded (to include early plugins when checking late ones) 429 429 Collection<PluginInformation> allPlugins = new HashSet<PluginInformation>(plugins); … … 449 449 450 450 String requires = local ? plugin.localrequires : plugin.requires; 451 451 452 452 // make sure the dependencies to other plugins are not broken 453 453 // … … 483 483 List<URL> allPluginLibraries = new LinkedList<URL>(); 484 484 File pluginDir = Main.pref.getPluginsDirectory(); 485 485 486 486 // Add all plugins already loaded (to include early plugins in the classloader, allowing late plugins to rely on early ones) 487 487 Collection<PluginInformation> allPlugins = new HashSet<PluginInformation>(plugins); … … 489 489 allPlugins.add(proxy.getPluginInformation()); 490 490 } 491 491 492 492 for (PluginInformation info : allPlugins) { 493 493 if (info.libraries == null) { … … 760 760 ); 761 761 } 762 762 763 763 private static Set<PluginInformation> findRequiredPluginsToDownload( 764 764 Collection<PluginInformation> pluginsToUpdate, List<PluginInformation> allPlugins, Set<PluginInformation> pluginsToDownload) { … … 818 818 Future<?> future = service.submit(task1); 819 819 List<PluginInformation> allPlugins = null; 820 820 821 821 try { 822 822 future.get(); … … 841 841 } 842 842 } 843 843 844 844 if (!pluginsToUpdate.isEmpty()) { 845 845 846 846 Set<PluginInformation> pluginsToDownload = new HashSet<PluginInformation>(pluginsToUpdate); 847 847 848 848 if (allPlugins != null) { 849 849 // Updated plugins may need additional plugin dependencies currently not installed … … 851 851 Set<PluginInformation> additionalPlugins = findRequiredPluginsToDownload(pluginsToUpdate, allPlugins, pluginsToDownload); 852 852 pluginsToDownload.addAll(additionalPlugins); 853 853 854 854 // Iterate on required plugins, if they need themselves another plugins (i.e A needs B, but B needs C) 855 855 while (!additionalPlugins.isEmpty()) { … … 881 881 return plugins; 882 882 } 883 883 884 884 // Update Plugin info for downloaded plugins 885 885 // 886 886 refreshLocalUpdatedPluginInfo(task2.getDownloadedPlugins()); 887 887 888 888 // notify user if downloading a locally installed plugin failed 889 889 // … … 1005 1005 return; 1006 1006 } 1007 1007 1008 1008 /** 1009 1009 * Determines if the specified file is a valid and accessible JAR file. … … 1023 1023 return false; 1024 1024 } 1025 1025 1026 1026 /** 1027 1027 * Replies the updated jar file for the given plugin name. … … 1043 1043 return downloadedPluginFile; 1044 1044 } 1045 1045 1046 1046 /** 1047 1047 * Refreshes the given PluginInformation objects with new contents read from their corresponding jar file. -
trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
r5874 r6070 58 58 public List<URL> libraries = new LinkedList<URL>(); 59 59 public final Map<String, String> attr = new TreeMap<String, String>(); 60 60 61 61 private static final ImageIcon emptyIcon = new ImageIcon(new BufferedImage(24, 24, BufferedImage.TYPE_INT_ARGB)); 62 62 … … 154 154 this.attr.putAll(other.attr); 155 155 } 156 156 157 157 /** 158 158 * Updates the plugin information of this plugin information object with the … … 173 173 this.stage = other.stage; 174 174 } 175 175 176 176 private void scanManifest(Manifest manifest, boolean oldcheck){ 177 177 String lang = LanguageInfo.getLanguageCodeManifest(); … … 495 495 return requiredPlugins; 496 496 } 497 498 /** 499 * Replies the list of plugins required by the up-to-date version of this plugin. 497 498 /** 499 * Replies the list of plugins required by the up-to-date version of this plugin. 500 500 * @return List of plugins required. Empty if no plugin is required. 501 501 * @since 5601 … … 504 504 return getRequiredPlugins(requires); 505 505 } 506 507 /** 508 * Replies the list of plugins required by the local instance of this plugin. 506 507 /** 508 * Replies the list of plugins required by the local instance of this plugin. 509 509 * @return List of plugins required. Empty if no plugin is required. 510 510 * @since 5601 … … 513 513 return getRequiredPlugins(localrequires); 514 514 } 515 516 /** 517 * Updates the local fields ({@link #localversion}, {@link #localmainversion}, {@link #localrequires}) 518 * to values contained in the up-to-date fields ({@link #version}, {@link #mainversion}, {@link #requires}) 515 516 /** 517 * Updates the local fields ({@link #localversion}, {@link #localmainversion}, {@link #localrequires}) 518 * to values contained in the up-to-date fields ({@link #version}, {@link #mainversion}, {@link #requires}) 519 519 * of the given PluginInformation. 520 520 * @param info The plugin information to get the data from.
Note: See TracChangeset
for help on using the changeset viewer.