Changeset 4815 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2012-01-18T15:39:14+01:00 (13 years ago)
Author:
bastiK
Message:

fixed #7281 - compile error

Location:
trunk/src/org/openstreetmap/josm/io
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/OsmApi.java

    r4809 r4815  
    194194                System.err.println(tr("It supports protocol version 0.6, while the server says it supports {0} to {1}.",
    195195                        capabilities.get("version", "minimum"), capabilities.get("version", "maximum")));
    196                 initialized = false; // FIXME get's overridden by next assignment
     196                initialized = false; // FIXME gets overridden by next assignment
    197197            }
    198198            initialized = true;
  • trunk/src/org/openstreetmap/josm/io/OsmImporter.java

    r4814 r4815  
    2222public class OsmImporter extends FileImporter {
    2323
    24     protected class OsmImporterData {
    25         public OsmDataLayer layer;
    26         public Runnable postLayerTask;
     24    public static class OsmImporterData {
     25
     26        private OsmDataLayer layer;
     27        private Runnable postLayerTask;
     28
     29        public OsmImporterData(OsmDataLayer layer, Runnable postLayerTask) {
     30            this.layer = layer;
     31            this.postLayerTask = postLayerTask;
     32        }
     33
     34        public OsmDataLayer getLayer() {
     35            return layer;
     36        }
     37
     38        public Runnable getPostLayerTask() {
     39            return postLayerTask;
     40        }
    2741    }
    2842
     
    4761
    4862    protected void importData(InputStream in, final File associatedFile) throws IllegalDataException {
    49         final OsmImporterData data = loadLayer(in, associatedFile, 
     63        final OsmImporterData data = loadLayer(in, associatedFile,
    5064                associatedFile == null ? OsmDataLayer.createNewName() : associatedFile.getName(), NullProgressMonitor.INSTANCE);
    5165
     
    7084            throw new IllegalDataException(tr("Invalid dataset"));
    7185        }
    72         OsmImporterData data = new OsmImporterData();
    73         data.layer = createLayer(dataSet, associatedFile, layerName);
    74         data.postLayerTask = createPostLayerTask(dataSet, associatedFile, layerName, data.layer);
    75         return data;
     86        OsmDataLayer layer = createLayer(dataSet, associatedFile, layerName);
     87        Runnable postLayerTask = createPostLayerTask(dataSet, associatedFile, layerName, layer);
     88        return new OsmImporterData(layer, postLayerTask);
    7689    }
    77    
     90
    7891    protected DataSet parseDataSet(InputStream in, ProgressMonitor progressMonitor) throws IllegalDataException {
    7992        return OsmReader.parseDataSet(in, progressMonitor);
    8093    }
    81    
     94
    8295    protected OsmDataLayer createLayer(final DataSet dataSet, final File associatedFile, final String layerName) {
    8396        return new OsmDataLayer(dataSet, layerName, associatedFile);
    8497    }
    85    
     98
    8699    protected Runnable createPostLayerTask(final DataSet dataSet, final File associatedFile, final String layerName, final OsmDataLayer layer) {
    87100        return new Runnable() {
  • trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionImporter.java

    r4668 r4815  
    4040            OsmImporter importer = new OsmImporter();
    4141            InputStream in = support.getInputStream(fileStr);
    42             importer.loadLayer(in, support.getFile(fileStr), support.getLayerName(), progressMonitor);
     42            OsmImporter.OsmImporterData importData = importer.loadLayer(in, support.getFile(fileStr), support.getLayerName(), progressMonitor);
    4343
    44             support.addPostLayersTask(importer.getPostLayerTask());
    45             return importer.getLayer();
     44            support.addPostLayersTask(importData.getPostLayerTask());
     45            return importData.getLayer();
    4646
    4747        } catch (XPathExpressionException e) {
Note: See TracChangeset for help on using the changeset viewer.