Changeset 33847 in osm for applications


Ignore:
Timestamp:
2017-11-21T01:24:57+01:00 (7 years ago)
Author:
donvip
Message:

fix deprecation warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModelTest.java

    r32925 r33847  
    1616import org.junit.Rule;
    1717import org.junit.Test;
    18 import org.openstreetmap.josm.Main;
    1918import org.openstreetmap.josm.data.coor.LatLon;
    2019import org.openstreetmap.josm.data.osm.DataSet;
     
    2322import org.openstreetmap.josm.data.osm.Relation;
    2423import org.openstreetmap.josm.data.osm.Way;
     24import org.openstreetmap.josm.gui.MainApplication;
    2525import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    2626import org.openstreetmap.josm.testutils.JOSMTestRules;
     
    137137        OsmDataLayer layer2 = new OsmDataLayer(new DataSet(), "layer2", null);
    138138
    139         Main.getLayerManager().addLayer(layer1);
    140         Main.getLayerManager().addLayer(layer2);
     139        MainApplication.getLayerManager().addLayer(layer1);
     140        MainApplication.getLayerManager().addLayer(layer2);
    141141
    142142        JosmSelectionListModel model = new JosmSelectionListModel(layer1);
    143         Main.getLayerManager().addActiveLayerChangeListener(model);
     143        MainApplication.getLayerManager().addActiveLayerChangeListener(model);
    144144        // switch from edit layer1 to edit layer2. content of the JOSM selection
    145145        // should be empty thereafter
    146         Main.getLayerManager().setActiveLayer(layer1);
    147         Main.getLayerManager().setActiveLayer(layer2);
     146        MainApplication.getLayerManager().setActiveLayer(layer1);
     147        MainApplication.getLayerManager().setActiveLayer(layer2);
    148148        assertEquals(0, model.getSize());
    149149
     
    151151        // be displayed in the JOSM selection list
    152152        ds.setSelected(Collections.singleton(objects.get(0)));
    153         Main.getLayerManager().setActiveLayer(layer1);
     153        MainApplication.getLayerManager().setActiveLayer(layer1);
    154154        assertEquals(1, model.getSize());
    155155        assertEquals(objects.get(0), model.getElementAt(0));
     
    157157        // switch to a "null" edit layer (i.e. no edit layer)- nothing should
    158158        // be displayed in the selection list
    159         Main.getLayerManager().removeLayer(layer2);
    160         Main.getLayerManager().removeLayer(layer1);
     159        MainApplication.getLayerManager().removeLayer(layer2);
     160        MainApplication.getLayerManager().removeLayer(layer1);
    161161        assertEquals(0, model.getSize());
    162162
    163         Main.getLayerManager().removeActiveLayerChangeListener(model);
     163        MainApplication.getLayerManager().removeActiveLayerChangeListener(model);
    164164    }
    165165}
Note: See TracChangeset for help on using the changeset viewer.