Changeset 1860 in josm for trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
- Timestamp:
- 2009-07-27T18:36:17+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
r1767 r1860 8 8 import java.io.IOException; 9 9 import java.io.InputStream; 10 import java.net.MalformedURLException; 10 11 import java.net.URL; 11 import java.net.MalformedURLException;12 12 import java.util.ArrayList; 13 13 import java.util.Collection; … … 15 15 import java.util.List; 16 16 import java.util.Map; 17 import java.util.Set;18 17 import java.util.TreeMap; 19 18 import java.util.jar.Attributes; … … 86 85 Manifest manifest = new Manifest(); 87 86 manifest.read(manifestStream); 88 if(url != null) 87 if(url != null) { 89 88 downloadlink = url; 89 } 90 90 scanManifest(manifest, url != null); 91 91 } catch (IOException e) { … … 100 100 className = attr.getValue("Plugin-Class"); 101 101 String s = attr.getValue(lang+"Plugin-Link"); 102 if(s == null) 102 if(s == null) { 103 103 s = attr.getValue("Plugin-Link"); 104 } 104 105 link = s; 105 106 requires = attr.getValue("Plugin-Requires"); … … 108 109 { 109 110 s = attr.getValue("Plugin-Description"); 110 if(s != null) 111 if(s != null) { 111 112 s = tr(s); 113 } 112 114 } 113 115 description = s; … … 151 153 for (String entry : classPath.split(" ")) { 152 154 File entryFile; 153 if (new File(entry).isAbsolute()) 155 if (new File(entry).isAbsolute()) { 154 156 entryFile = new File(entry); 155 else157 } else { 156 158 entryFile = new File(file.getParent(), entry); 159 } 157 160 158 161 libraries.add(fileToURL(entryFile)); 159 162 } 160 163 } 161 for (Object o : attr.keySet()) 164 for (Object o : attr.keySet()) { 162 165 this.attr.put(o.toString(), attr.getValue(o.toString())); 166 } 163 167 } 164 168 … … 166 170 { 167 171 String d = description == null ? tr("no description available") : description; 168 if(link != null) 172 if(link != null) { 169 173 d += " <A HREF=\""+link+"\">"+tr("More details")+"</A>"; 174 } 170 175 return d; 171 176 } … … 262 267 Collection<String> locations = Main.pref.getAllPossiblePreferenceDirs(); 263 268 Collection<String> all = new ArrayList<String>(locations.size()); 264 for (String s : locations) 269 for (String s : locations) { 265 270 all.add(s+"plugins"); 271 } 266 272 return all; 267 273 }
Note:
See TracChangeset
for help on using the changeset viewer.