Changeset 4393 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2011-09-01T11:00:02+02:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
r4371 r4393 284 284 if (importer.isBatchImporter()) { 285 285 if (canceled) return; 286 String msg; 287 if (files.size() == 1) { 288 msg = tr("Opening 1 file..."); 289 } else { 290 msg = trn("Opening {0} file...", "Opening {0} files...", files.size(), files.size()); 291 } 286 String msg = trn("Opening {0} file...", "Opening {0} files...", files.size(), files.size()); 292 287 getProgressMonitor().setCustomText(msg); 293 288 getProgressMonitor().indeterminateSubTask(msg); -
trunk/src/org/openstreetmap/josm/io/OsmImporter.java
r3225 r4393 10 10 import java.io.InputStream; 11 11 12 import javax.swing.JOptionPane; 12 13 import javax.swing.SwingUtilities; 13 14 … … 39 40 } 40 41 41 protected void importData(InputStream in, File associatedFile) throws IllegalDataException {42 DataSet dataSet = OsmReader.parseDataSet(in, NullProgressMonitor.INSTANCE);42 protected void importData(InputStream in, final File associatedFile) throws IllegalDataException { 43 final DataSet dataSet = OsmReader.parseDataSet(in, NullProgressMonitor.INSTANCE); 43 44 final OsmDataLayer layer = new OsmDataLayer(dataSet, associatedFile.getName(), associatedFile); 44 45 // FIXME: remove UI stuff from IO subsystem 45 46 // 46 47 Runnable uiStuff = new Runnable() { 48 @Override 47 49 public void run() { 50 if (dataSet.allPrimitives().isEmpty()) { 51 JOptionPane.showMessageDialog( 52 Main.parent, 53 tr("No data found in file {0}.", associatedFile.getPath()), 54 tr("Open OSM file"), 55 JOptionPane.INFORMATION_MESSAGE); 56 } 48 57 Main.main.addLayer(layer); 49 58 layer.onPostLoadFromFile();
Note:
See TracChangeset
for help on using the changeset viewer.