Changeset 30738 in osm for applications/editors/josm/plugins/opendata/util
- Timestamp:
- 2014-10-19T01:27:04+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/util/opendata/ModuleListGenerator.java
r30340 r30738 15 15 import java.util.zip.ZipOutputStream; 16 16 17 import org.openstreetmap.josm.Main; 18 17 19 public class ModuleListGenerator { 18 20 … … 26 28 baseDir = args[0]; 27 29 } 28 try {30 try ( 29 31 BufferedWriter list = new BufferedWriter(new FileWriter(baseDir+"modules.txt")); 30 32 ZipOutputStream zip = new ZipOutputStream(new FileOutputStream(baseDir+"modules-icons.zip")); 33 ) { 31 34 for (File file : new File(baseDir+"dist").listFiles(new FilenameFilter() { 32 35 @Override … … 37 40 try { 38 41 String filename = file.getName(); 39 System.out.println("Processing "+filename);42 Main.info("Processing "+filename); 40 43 list.write(filename+";"+url+filename); list.newLine(); 41 44 Manifest mf = new JarFile(file).getManifest(); … … 77 80 } 78 81 } catch (IOException e) { 79 System.err.println("Cannot load Image-Icon: "+value.toString());82 Main.error("Cannot load Image-Icon: "+value.toString()); 80 83 } finally { 81 84 zip.closeEntry(); … … 84 87 } 85 88 } 86 89 87 90 } catch (IOException e) { 88 e.printStackTrace();91 Main.error(e); 89 92 } 90 93 } 91 System.out.println("Done");92 zip.close();93 list.close();94 94 } catch (IOException e) { 95 e.printStackTrace();95 Main.error(e); 96 96 } 97 97 }
Note:
See TracChangeset
for help on using the changeset viewer.