Changeset 3530 in josm for trunk/src/org/openstreetmap/josm/plugins
- Timestamp:
- 2010-09-15T08:21:16+02:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/plugins
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/plugins/Plugin.java
r3070 r3530 48 48 /** 49 49 * Creates the plugin 50 * 50 * 51 51 * @param info the plugin information describing the plugin. 52 52 */ … … 57 57 /** 58 58 * Replies the plugin information object for this plugin 59 * 59 * 60 60 * @return the plugin information object 61 61 */ … … 66 66 /** 67 67 * Sets the plugin information object for this plugin 68 * 68 * 69 69 * @parma info the plugin information object 70 70 */ … … 76 76 * @return The directory for the plugin to store all kind of stuff. 77 77 */ 78 public finalString getPluginDir() {78 public String getPluginDir() { 79 79 return new File(Main.pref.getPluginsDirectory(), info.name).getPath(); 80 80 } … … 103 103 */ 104 104 public void copy(String from, String to) throws FileNotFoundException, IOException { 105 String pluginDirName = Main.pref.getPluginsDirectory() + "/" + info.name + "/";105 String pluginDirName = getPluginDir(); 106 106 File pluginDir = new File(pluginDirName); 107 107 if (!pluginDir.exists()) { 108 108 pluginDir.mkdirs(); 109 109 } 110 FileOutputStream out = new FileOutputStream( pluginDirName+to);110 FileOutputStream out = new FileOutputStream(new File(pluginDirName, to)); 111 111 InputStream in = getClass().getResourceAsStream(from); 112 112 byte[] buffer = new byte[8192]; -
trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java
r3332 r3530 29 29 /** 30 30 * Asynchronous task for downloading a collection of plugins. 31 * 31 * 32 32 * When the task is finished {@see #getDownloadedPlugins()} replies the list of downloaded plugins 33 33 * and {@see #getFailedPlugins()} replies the list of failed plugins. 34 * 34 * 35 35 */ 36 36 public class PluginDownloadTask extends PleaseWaitRunnable{ … … 47 47 /** 48 48 * Creates the download task 49 * 49 * 50 50 * @param parent the parent component relative to which the {@see PleaseWaitDialog} is displayed 51 51 * @param toUpdate a collection of plugin descriptions for plugins to update/download. Must not be null. … … 61 61 /** 62 62 * Creates the task 63 * 63 * 64 64 * @param monitor a progress monitor. Defaults to {@see NullProgressMonitor#INSTANCE} if null 65 65 * @param toUpdate a collection of plugin descriptions for plugins to update/download. Must not be null. … … 75 75 /** 76 76 * Sets the collection of plugins to update. 77 * 77 * 78 78 * @param toUpdate the collection of plugins to update. Must not be null. 79 79 * @throws IllegalArgumentException thrown if toUpdate is null … … 190 190 /** 191 191 * Replies true if the task was cancelled by the user 192 * 192 * 193 193 * @return 194 194 */ … … 199 199 /** 200 200 * Replies the list of successfully downloaded plugins 201 * 201 * 202 202 * @return the list of successfully downloaded plugins 203 203 */ … … 208 208 /** 209 209 * Replies the list of plugins whose download has failed 210 * 210 * 211 211 * @return the list of plugins whose download has failed 212 212 */ -
trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
r3331 r3530 58 58 * Creates a plugin information object by reading the plugin information from 59 59 * the manifest in the plugin jar. 60 * 60 * 61 61 * The plugin name is derived from the file name. 62 * 62 * 63 63 * @param file the plugin jar file 64 64 * @throws PluginException if reading the manifest fails … … 101 101 * Creates a plugin information object by reading plugin information in Manifest format 102 102 * from the input stream {@code manifestStream}. 103 * 103 * 104 104 * @param manifestStream the stream to read the manifest from 105 105 * @param name the plugin name … … 125 125 * plugin information in a plugin information object retrieved from a plugin 126 126 * update site. 127 * 127 * 128 128 * @param other the plugin information object retrieved from the update 129 129 * site … … 227 227 * Replies the description as HTML document, including a link to a web page with 228 228 * more information, provided such a link is available. 229 * 229 * 230 230 * @return the description as HTML document 231 231 */ … … 243 243 /** 244 244 * Load and instantiate the plugin 245 * 245 * 246 246 * @param the plugin class 247 247 * @return the instantiated and initialized plugin … … 265 265 /** 266 266 * Load the class of the plugin 267 * 267 * 268 268 * @param classLoader the class loader to use 269 269 * @return the loaded class … … 356 356 * Replies true if the plugin with the given information is most likely outdated with 357 357 * respect to the referenceVersion. 358 * 358 * 359 359 * @param referenceVersion the reference version. Can be null if we don't know a 360 360 * reference version 361 * 361 * 362 362 * @return true, if the plugin needs to be updated; false, otherweise 363 363 */ … … 375 375 * it is not available locally (its local version is null) or its local version is 376 376 * older than the available version on the server. 377 * 377 * 378 378 * @return true if the plugin should be updated 379 379 */ … … 393 393 * Replies true if either the name, the description, or the version match (case insensitive) 394 394 * one of the words in filter. Replies true if filter is null. 395 * 395 * 396 396 * @param filter the filter expression 397 397 * @return true if this plugin info matches with the filter -
trunk/src/org/openstreetmap/josm/plugins/PluginListParser.java
r3083 r3530 15 15 /** 16 16 * A parser for the plugin list provided by a JOSM Plugin Download Site. 17 * 17 * 18 18 * See <a href="http://josm.openstreetmap.de/plugin">http://josm.openstreetmap.de/plugin</a> 19 19 * for a sample of the document. The format is a custom format, kind of mix of CSV and RFC822 style … … 25 25 /** 26 26 * Creates the plugin information object 27 * 27 * 28 28 * @param name the plugin name 29 29 * @param url the plugin download url … … 48 48 /** 49 49 * Parses a plugin information document and replies a list of plugin information objects. 50 * 50 * 51 51 * See <a href="http://josm.openstreetmap.de/plugin">http://josm.openstreetmap.de/plugin</a> 52 52 * for a sample of the document. The format is a custom format, kind of mix of CSV and RFC822 style 53 53 * name/value-pairs. 54 * 54 * 55 55 * @param in the input stream from which to parse 56 56 * @return the list of plugin information objects -
trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java
r3331 r3530 23 23 * This is an asynchronous task for reading plugin information from the files 24 24 * in the local plugin repositories. 25 * 25 * 26 26 * It scans the files in the local plugins repository (see {@see Preferences#getPluginsDirectory()} 27 27 * and extracts plugin information from three kind of files: … … 231 231 /** 232 232 * Replies information about available plugins detected by this task. 233 * 233 * 234 234 * @return information about available plugins detected by this task. 235 235 */ … … 240 240 /** 241 241 * Replies true if the task was cancelled by the user 242 * 242 * 243 243 * @return true if the task was cancelled by the user 244 244 */
Note:
See TracChangeset
for help on using the changeset viewer.