Changeset 15707 in osm for applications/editors/josm/plugins/openvisible
- Timestamp:
- 2009-06-06T22:25:31+02:00 (16 years ago)
- Location:
- applications/editors/josm/plugins/openvisible
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/openvisible/build.xml
r14015 r15707 26 26 <attribute name="Plugin-Dependencies" value="jgrapht-jdk1.5"/> 27 27 <attribute name="Plugin-Description" value="Allows opening gpx/osm files that intersect the currently visible screen area"/> 28 <attribute name="Plugin-Mainversion" value="1 465"/>28 <attribute name="Plugin-Mainversion" value="1646"/> 29 29 <attribute name="Plugin-Stage" value="50"/> 30 30 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> -
applications/editors/josm/plugins/openvisible/src/at/dallermassl/josm/plugin/openvisible/OpenVisibleAction.java
r13497 r15707 29 29 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 30 30 import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer; 31 import org.openstreetmap.josm.io.GpxImporter; 31 32 import org.openstreetmap.josm.io.GpxReader; 33 import org.openstreetmap.josm.io.OsmImporter; 32 34 import org.openstreetmap.josm.io.OsmReader; 33 35 import org.openstreetmap.josm.tools.Shortcut; … … 100 102 private void openAsData(File file) throws SAXException, IOException, FileNotFoundException { 101 103 String fn = file.getName(); 102 if ( ExtensionFileFilter.filters[ExtensionFileFilter.OSM].acceptName(fn)) {104 if (new OsmImporter().acceptFile(file)) { 103 105 DataSet dataSet = OsmReader.parseDataSet(new FileInputStream(file), null, Main.pleaseWaitDlg); 104 OsmDataLayer layer = new OsmDataLayer(dataSet, f ile.getName(), file);106 OsmDataLayer layer = new OsmDataLayer(dataSet, fn, file); 105 107 Main.main.addLayer(layer); 106 108 } 107 109 else 108 JOptionPane.showMessageDialog(Main.parent, fn+": "+tr("Unknown file extension: {0}", fn.substring(f ile.getName().lastIndexOf('.')+1)));110 JOptionPane.showMessageDialog(Main.parent, fn+": "+tr("Unknown file extension: {0}", fn.substring(fn.lastIndexOf('.')+1))); 109 111 } 110 112 111 113 private void openFileAsGpx(File file) throws SAXException, IOException, FileNotFoundException { 112 114 String fn = file.getName(); 113 if ( ExtensionFileFilter.filters[ExtensionFileFilter.GPX].acceptName(fn)) {115 if (new GpxImporter().acceptFile(file)) { 114 116 GpxReader r = null; 115 117 if (file.getName().endsWith(".gpx.gz")) {
Note:
See TracChangeset
for help on using the changeset viewer.