Changeset 35139 in osm for applications/editors/josm
- Timestamp:
- 2019-09-26T20:51:07+02:00 (5 years ago)
- Location:
- applications/editors/josm/plugins/opendata
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/build.xml
r34972 r35139 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <project name="opendata" default="dist" basedir="."> 3 <property name="plugin.main.version" value="1 4977"/>3 <property name="plugin.main.version" value="15377"/> 4 4 <property name="plugin.author" value="Don-vip"/> 5 5 <property name="plugin.class" value="org.openstreetmap.josm.plugins.opendata.OdPlugin"/> -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/OdPlugin.java
r34452 r35139 22 22 import org.openstreetmap.josm.gui.preferences.PreferenceSetting; 23 23 import org.openstreetmap.josm.gui.util.GuiHelper; 24 import org.openstreetmap.josm.io.session.SessionReader; 25 import org.openstreetmap.josm.io.session.SessionWriter; 24 26 import org.openstreetmap.josm.plugins.Plugin; 25 27 import org.openstreetmap.josm.plugins.PluginInformation; … … 39 41 import org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifTabImporter; 40 42 import org.openstreetmap.josm.plugins.opendata.core.io.geographic.ShpImporter; 43 import org.openstreetmap.josm.plugins.opendata.core.io.session.OpenDataSessionExporter; 44 import org.openstreetmap.josm.plugins.opendata.core.io.session.OpenDataSessionImporter; 41 45 import org.openstreetmap.josm.plugins.opendata.core.io.tabular.CsvImporter; 42 46 import org.openstreetmap.josm.plugins.opendata.core.io.tabular.OdsImporter; 43 47 import org.openstreetmap.josm.plugins.opendata.core.io.tabular.XlsImporter; 48 import org.openstreetmap.josm.plugins.opendata.core.layers.OdDataLayer; 44 49 import org.openstreetmap.josm.plugins.opendata.core.modules.Module; 45 50 import org.openstreetmap.josm.plugins.opendata.core.modules.ModuleHandler; … … 58 63 59 64 private OdDialog dialog; 65 66 public final List<AbstractImporter> importers = Arrays.asList(new AbstractImporter[]{ 67 new CsvImporter(), new OdsImporter(), new XlsImporter(), // Tabular file formats 68 new KmlKmzImporter(), new ShpImporter(), new MifTabImporter(), new GmlImporter(), // Geographic file formats 69 new ZipImporter(), // Zip archive containing any of the others 70 new SevenZipImporter(), // 7Zip archive containing any of the others 71 xmlImporter // Generic importer for XML files (currently used for Neptune files) 72 }); 60 73 61 74 public OdPlugin(PluginInformation info) { … … 68 81 } 69 82 // Allow JOSM to import more files 70 for (AbstractImporter importer : Arrays.asList(new AbstractImporter[]{ 71 new CsvImporter(), new OdsImporter(), new XlsImporter(), // Tabular file formats 72 new KmlKmzImporter(), new ShpImporter(), new MifTabImporter(), new GmlImporter(), // Geographic file formats 73 new ZipImporter(), // Zip archive containing any of the others 74 new SevenZipImporter(), // 7Zip archive containing any of the others 75 xmlImporter // Generic importer for XML files (currently used for Neptune files) 76 })) { 77 ExtensionFileFilter.addImporterFirst(importer); 78 } 83 importers.forEach(ExtensionFileFilter::addImporterFirst); 84 // Session support 85 SessionReader.registerSessionLayerImporter("open-data", OpenDataSessionImporter.class); 86 SessionWriter.registerSessionLayerExporter(OdDataLayer.class, OpenDataSessionExporter.class); 79 87 80 88 menu = MainApplication.getMenu().dataMenu; -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/AbstractImporter.java
r33553 r35139 44 44 } 45 45 46 public final void setFile(File file) { 47 this.file = file; 48 } 49 46 50 @Override 47 51 public void importData(File file, ProgressMonitor progressMonitor)
Note:
See TracChangeset
for help on using the changeset viewer.