Ignore:
Timestamp:
2017-08-24T22:53:50+02:00 (20 months ago)
Author:
Don-vip
Message:

see #15182 - deprecate Main.getLayerManager(). Replacement: gui.MainApplication.getLayerManager()

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

Legend:

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

    r12634 r12636  
    8686        // FIXME: should now about the layer this task is running for. might
    8787        // be different from the current edit layer
    88         OsmDataLayer layer = Main.getLayerManager().getEditLayer();
     88        OsmDataLayer layer = MainApplication.getLayerManager().getEditLayer();
    8989        if (layer == null)
    9090            throw new IllegalStateException(tr("Failed to update primitive with id {0} because current edit layer is null", id));
     
    275275        );
    276276        if (ret == 0) {
    277             DownloadReferrersAction.downloadReferrers(Main.getLayerManager().getEditLayer(), Arrays.asList(conflict.a));
     277            DownloadReferrersAction.downloadReferrers(MainApplication.getLayerManager().getEditLayer(), Arrays.asList(conflict.a));
    278278        }
    279279    }
  • trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java

    r12279 r12636  
    2424import org.openstreetmap.josm.data.osm.PrimitiveId;
    2525import org.openstreetmap.josm.gui.ExtendedDialog;
     26import org.openstreetmap.josm.gui.MainApplication;
    2627import org.openstreetmap.josm.gui.PleaseWaitRunnable;
    2728import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     
    129130
    130131        // Append downloaded data to JOSM
    131         OsmDataLayer layer = Main.getLayerManager().getEditLayer();
     132        OsmDataLayer layer = MainApplication.getLayerManager().getEditLayer();
    132133        if (layer == null || this.newLayer)
    133             Main.getLayerManager().addLayer(tmpLayer);
     134            MainApplication.getLayerManager().addLayer(tmpLayer);
    134135        else
    135136            layer.mergeFrom(tmpLayer);
     
    152153        // Warm about deleted primitives
    153154        final Set<PrimitiveId> del = new HashSet<>();
    154         DataSet ds = Main.getLayerManager().getEditDataSet();
     155        DataSet ds = MainApplication.getLayerManager().getEditDataSet();
    155156        for (PrimitiveId id : ids) {
    156157            OsmPrimitive osm = ds.getPrimitiveById(id);
  • trunk/src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java

    r12265 r12636  
    1212import javax.swing.event.TableModelListener;
    1313
    14 import org.openstreetmap.josm.Main;
    1514import org.openstreetmap.josm.data.osm.Changeset;
     15import org.openstreetmap.josm.gui.MainApplication;
    1616import org.openstreetmap.josm.gui.tagging.TagEditorPanel;
    1717import org.openstreetmap.josm.gui.tagging.TagModel;
     
    9999     */
    100100    public void startUserInput() {
    101         pnlTagEditor.initAutoCompletion(Main.getLayerManager().getEditLayer());
     101        pnlTagEditor.initAutoCompletion(MainApplication.getLayerManager().getEditLayer());
    102102    }
    103103
Note: See TracChangeset for help on using the changeset viewer.