Changeset 2830 in josm for trunk/src/org/openstreetmap/josm/plugins/Plugin.java
- Timestamp:
- 2010-01-12T18:27:40+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/plugins/Plugin.java
r2817 r2830 15 15 16 16 /** 17 * All plugins *must* have an standard constructor taking no arguments.18 *19 * This constructor is called at JOSM startup, after all Main-objects have been initialized.20 17 * For all purposes of loading dynamic resources, the Plugin's class loader should be used 21 18 * (or else, the plugin jar will not be within the class path). … … 47 44 * is a bit hacky, but it works). 48 45 */ 49 public final PluginInformation info = PluginInformation.currentPluginInitialization; 46 private PluginInformation info = null; 47 48 /** 49 * The no-arg constructor is deprecated. 50 * 51 * @deprecated use {@see Plugin(PluginInformation)} instead 52 */ 53 @Deprecated 54 public Plugin() { 55 56 } 57 /** 58 * Creates the plugin 59 * 60 * @param info the plugin information describing the plugin. 61 */ 62 public Plugin(PluginInformation info) { 63 this.info = info; 64 } 65 66 /** 67 * Replies the plugin information object for this plugin 68 * 69 * @return the plugin information object 70 */ 71 public PluginInformation getPluginInformation() { 72 return info; 73 } 74 75 /** 76 * Sets the plugin information object for this plugin 77 * 78 * @parma info the plugin information object 79 */ 80 public void setPluginInformation(PluginInformation info) { 81 this.info = info; 82 } 50 83 51 84 /** … … 79 112 */ 80 113 public void copy(String from, String to) throws FileNotFoundException, IOException { 81 String pluginDirName = Main.pref.getP referencesDir()+"plugins/"+info.name+"/";114 String pluginDirName = Main.pref.getPluginsDirectory() + "/" + info.name + "/"; 82 115 File pluginDir = new File(pluginDirName); 83 116 if (!pluginDir.exists()) {
Note:
See TracChangeset
for help on using the changeset viewer.