Ignore:
Timestamp:
2010-09-15T08:21:16+02:00 (14 years ago)
Author:
stoecker
Message:

fix array preferences

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

Legend:

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

    r3070 r3530  
    4848    /**
    4949     * Creates the plugin
    50      * 
     50     *
    5151     * @param info the plugin information describing the plugin.
    5252     */
     
    5757    /**
    5858     * Replies the plugin information object for this plugin
    59      * 
     59     *
    6060     * @return the plugin information object
    6161     */
     
    6666    /**
    6767     * Sets the plugin information object for this plugin
    68      * 
     68     *
    6969     * @parma info the plugin information object
    7070     */
     
    7676     * @return The directory for the plugin to store all kind of stuff.
    7777     */
    78     public final String getPluginDir() {
     78    public String getPluginDir() {
    7979        return new File(Main.pref.getPluginsDirectory(), info.name).getPath();
    8080    }
     
    103103     */
    104104    public void copy(String from, String to) throws FileNotFoundException, IOException {
    105         String pluginDirName = Main.pref.getPluginsDirectory() + "/" + info.name + "/";
     105        String pluginDirName = getPluginDir();
    106106        File pluginDir = new File(pluginDirName);
    107107        if (!pluginDir.exists()) {
    108108            pluginDir.mkdirs();
    109109        }
    110         FileOutputStream out = new FileOutputStream(pluginDirName+to);
     110        FileOutputStream out = new FileOutputStream(new File(pluginDirName, to));
    111111        InputStream in = getClass().getResourceAsStream(from);
    112112        byte[] buffer = new byte[8192];
  • trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java

    r3332 r3530  
    2929/**
    3030 * Asynchronous task for downloading a collection of plugins.
    31  * 
     31 *
    3232 * When the task is finished {@see #getDownloadedPlugins()} replies the list of downloaded plugins
    3333 * and {@see #getFailedPlugins()} replies the list of failed plugins.
    34  * 
     34 *
    3535 */
    3636public class PluginDownloadTask extends PleaseWaitRunnable{
     
    4747    /**
    4848     * Creates the download task
    49      * 
     49     *
    5050     * @param parent the parent component relative to which the {@see PleaseWaitDialog} is displayed
    5151     * @param toUpdate a collection of plugin descriptions for plugins to update/download. Must not be null.
     
    6161    /**
    6262     * Creates the task
    63      * 
     63     *
    6464     * @param monitor a progress monitor. Defaults to {@see NullProgressMonitor#INSTANCE} if null
    6565     * @param toUpdate a collection of plugin descriptions for plugins to update/download. Must not be null.
     
    7575    /**
    7676     * Sets the collection of plugins to update.
    77      * 
     77     *
    7878     * @param toUpdate the collection of plugins to update. Must not be null.
    7979     * @throws IllegalArgumentException thrown if toUpdate is null
     
    190190    /**
    191191     * Replies true if the task was cancelled by the user
    192      * 
     192     *
    193193     * @return
    194194     */
     
    199199    /**
    200200     * Replies the list of successfully downloaded plugins
    201      * 
     201     *
    202202     * @return the list of successfully downloaded plugins
    203203     */
     
    208208    /**
    209209     * Replies the list of plugins whose download has failed
    210      * 
     210     *
    211211     * @return the list of plugins whose download has failed
    212212     */
  • trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java

    r3331 r3530  
    5858     * Creates a plugin information object by reading the plugin information from
    5959     * the manifest in the plugin jar.
    60      * 
     60     *
    6161     * The plugin name is derived from the file name.
    62      * 
     62     *
    6363     * @param file the plugin jar file
    6464     * @throws PluginException if reading the manifest fails
     
    101101     * Creates a plugin information object by reading plugin information in Manifest format
    102102     * from the input stream {@code manifestStream}.
    103      * 
     103     *
    104104     * @param manifestStream the stream to read the manifest from
    105105     * @param name the plugin name
     
    125125     * plugin information in a plugin information object retrieved from a plugin
    126126     * update site.
    127      * 
     127     *
    128128     * @param other the plugin information object retrieved from the update
    129129     * site
     
    227227     * Replies the description as HTML document, including a link to a web page with
    228228     * more information, provided such a link is available.
    229      * 
     229     *
    230230     * @return the description as HTML document
    231231     */
     
    243243    /**
    244244     * Load and instantiate the plugin
    245      * 
     245     *
    246246     * @param the plugin class
    247247     * @return the instantiated and initialized plugin
     
    265265    /**
    266266     * Load the class of the plugin
    267      * 
     267     *
    268268     * @param classLoader the class loader to use
    269269     * @return the loaded class
     
    356356     * Replies true if the plugin with the given information is most likely outdated with
    357357     * respect to the referenceVersion.
    358      * 
     358     *
    359359     * @param referenceVersion the reference version. Can be null if we don't know a
    360360     * reference version
    361      * 
     361     *
    362362     * @return true, if the plugin needs to be updated; false, otherweise
    363363     */
     
    375375     * it is not available locally (its local version is null) or its local version is
    376376     * older than the available version on the server.
    377      * 
     377     *
    378378     * @return true if the plugin should be updated
    379379     */
     
    393393     * Replies true if either the name, the description, or the version match (case insensitive)
    394394     * one of the words in filter. Replies true if filter is null.
    395      * 
     395     *
    396396     * @param filter the filter expression
    397397     * @return true if this plugin info matches with the filter
  • trunk/src/org/openstreetmap/josm/plugins/PluginListParser.java

    r3083 r3530  
    1515/**
    1616 * A parser for the plugin list provided by a JOSM Plugin Download Site.
    17  * 
     17 *
    1818 * See <a href="http://josm.openstreetmap.de/plugin">http://josm.openstreetmap.de/plugin</a>
    1919 * for a sample of the document. The format is a custom format, kind of mix of CSV and RFC822 style
     
    2525    /**
    2626     * Creates the plugin information object
    27      * 
     27     *
    2828     * @param name the plugin name
    2929     * @param url the plugin download url
     
    4848    /**
    4949     * Parses a plugin information document and replies a list of plugin information objects.
    50      * 
     50     *
    5151     * See <a href="http://josm.openstreetmap.de/plugin">http://josm.openstreetmap.de/plugin</a>
    5252     * for a sample of the document. The format is a custom format, kind of mix of CSV and RFC822 style
    5353     * name/value-pairs.
    54      * 
     54     *
    5555     * @param in the input stream from which to parse
    5656     * @return the list of plugin information objects
  • trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java

    r3331 r3530  
    2323 * This is an asynchronous task for reading plugin information from the files
    2424 * in the local plugin repositories.
    25  * 
     25 *
    2626 * It scans the files in the local plugins repository (see {@see Preferences#getPluginsDirectory()}
    2727 * and extracts plugin information from three kind of files:
     
    231231    /**
    232232     * Replies information about available plugins detected by this task.
    233      * 
     233     *
    234234     * @return information about available plugins detected by this task.
    235235     */
     
    240240    /**
    241241     * Replies true if the task was cancelled by the user
    242      * 
     242     *
    243243     * @return true if the task was cancelled by the user
    244244     */
Note: See TracChangeset for help on using the changeset viewer.