Ignore:
Timestamp:
2016-07-01T09:38:10+02:00 (8 years ago)
Author:
donvip
Message:

remove calls to deprecated methods

Location:
applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsLoadAction.java

    r30738 r32480  
    8181                try {
    8282                    fileStream = new FileInputStream(f);
    83                     SdsParser p = new SdsParser(Main.main.getCurrentDataSet(), plugin, false);
     83                    SdsParser p = new SdsParser(getLayerManager().getEditDataSet(), plugin, false);
    8484                    InputSource inputSource = new InputSource(fileStream);
    8585                    SAXParserFactory.newInstance().newSAXParser().parse(inputSource, p);
  • applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsMenu.java

    r32329 r32480  
    2121import org.openstreetmap.josm.actions.JosmAction;
    2222import org.openstreetmap.josm.gui.MainMenu;
    23 import org.openstreetmap.josm.gui.MapView;
    24 import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
    25 import org.openstreetmap.josm.gui.layer.Layer;
     23import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent;
     24import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener;
     25import org.openstreetmap.josm.gui.layer.LayerManager.LayerOrderChangeEvent;
     26import org.openstreetmap.josm.gui.layer.LayerManager.LayerRemoveEvent;
     27import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent;
     28import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener;
    2629import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    2730import org.openstreetmap.josm.gui.preferences.PreferenceDialog;
    2831
    2932@SuppressWarnings("serial")
    30 public class SdsMenu extends JMenu implements LayerChangeListener {
     33public class SdsMenu extends JMenu implements LayerChangeListener, ActiveLayerChangeListener {
    3134
    3235    private JMenuItem saveItem;
     
    5053        menu.add(aboutItem);
    5154       
    52         MapView.addLayerChangeListener(this);
     55        Main.getLayerManager().addLayerChangeListener(this);
     56        Main.getLayerManager().addActiveLayerChangeListener(this);
    5357        setEnabledState();
    5458    }
     
    6165 
    6266    @Override
    63     public void activeLayerChange(Layer oldLayer, Layer newLayer) {    setEnabledState(); }
     67    public void activeOrEditLayerChanged(ActiveLayerChangeEvent e) {    setEnabledState(); }
    6468
    6569    @Override
    66     public void layerAdded(Layer newLayer) { setEnabledState(); }
     70    public void layerOrderChanged(LayerOrderChangeEvent e) { }
    6771
    6872    @Override
    69     public void layerRemoved(Layer oldLayer) { setEnabledState(); }
     73    public void layerAdded(LayerAddEvent e) { setEnabledState(); }
     74
     75    @Override
     76    public void layerRemoving(LayerRemoveEvent e) { setEnabledState(); }
    7077
    7178    private class SdsAboutAction extends JosmAction {
Note: See TracChangeset for help on using the changeset viewer.