Changeset 2001 in josm for trunk/src/org
- Timestamp:
- 2009-08-29T11:08:38+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/DiskAccessAction.java
r1978 r2001 38 38 for (FileImporter imExporter: ExtensionFileFilter.importers) { 39 39 fc.addChoosableFileFilter(imExporter.filter); 40 if (imExporter .filter.defaultExtension.endsWith("osm")) {40 if (imExporter instanceof ExtensionFileFilter.AllFormatsImporter) { 41 41 defaultFilter = imExporter.filter; 42 42 } -
trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
r1949 r2001 1 1 // License: GPL. Copyright 2007 by Immanuel Scholz and others 2 2 package org.openstreetmap.josm.actions; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 3 5 4 6 import java.io.File; … … 31 33 public final String defaultExtension; 32 34 35 /** 36 * list of supported formats 37 */ 33 38 public static ArrayList<FileImporter> importers = new ArrayList<FileImporter>(Arrays.asList(new OsmImporter(), 34 new OsmGzipImporter(), new OsmBzip2Importer(), new GpxImporter(), new NMEAImporter() ));39 new OsmGzipImporter(), new OsmBzip2Importer(), new GpxImporter(), new NMEAImporter(), new AllFormatsImporter())); 35 40 36 // list of supported export formats37 41 public static ArrayList<FileExporter> exporters = new ArrayList<FileExporter>(Arrays.asList(new GpxExporter(), 38 42 new OsmExporter(), new OsmGzipExporter(), new OsmBzip2Exporter())); 39 43 40 44 /** 41 45 * Construct an extension file filter by giving the extension to check after. 42 *43 46 */ 44 47 public ExtensionFileFilter(String extension, String defExt, String description) { … … 65 68 return description; 66 69 } 70 71 /** 72 * Dummy importer that adds the "All Formats"-Filter when opening files 73 */ 74 public static class AllFormatsImporter extends FileImporter { 75 public AllFormatsImporter() { 76 super( 77 new ExtensionFileFilter("osm,xml,osm.gz,osm.bz2,osm.bz,gpx,gpx.gz,nmea,nme,nma,txt", "", tr("All Formats") 78 + " (*.gpx *.osm *.nmea ...)")); 79 } 80 @Override public boolean acceptFile(File pathname) { 81 return false; 82 } 83 } 67 84 } -
trunk/src/org/openstreetmap/josm/io/OsmBzip2Importer.java
r1653 r2001 16 16 17 17 public OsmBzip2Importer() { 18 super(new ExtensionFileFilter("osm.bz2, 18 super(new ExtensionFileFilter("osm.bz2,osm.bz", "osm.bz2", tr("OSM Server Files bzip2 compressed") 19 19 + " (*.osm.bz2 *.osm.bz)")); 20 20 }
Note:
See TracChangeset
for help on using the changeset viewer.