Changeset 32474 in osm


Ignore:
Timestamp:
2016-06-30T23:46:16+02:00 (8 years ago)
Author:
donvip
Message:

remove calls to deprecated methods

Location:
applications/editors/josm/plugins/tracer2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/tracer2/build.xml

    r31926 r32474  
    55    <property name="commit.message" value="see #josm11090"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="7001"/>
     7    <property name="plugin.main.version" value="10353"/>
    88
    99    <!-- Configure these properties (replace "..." accordingly).
    10 
    11 
    12 
    1310         See https://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
    1411    -->
  • applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/ConnectWays.java

    r30927 r32474  
    7575        BBox bbox = new BBox(way);
    7676        bbox.addPrimitive(way,s_dMinDistance);
    77         s_oWays = Main.main.getCurrentDataSet().searchWays(bbox);
     77        s_oWays = Main.getLayerManager().getEditDataSet().searchWays(bbox);
    7878    }
    7979   
     
    8787        BBox bbox = new BBox(way);
    8888        bbox.addPrimitive(way,s_dMinDistance);
    89         s_oNodes = Main.main.getCurrentDataSet().searchNodes(bbox);
     89        s_oNodes = Main.getLayerManager().getEditDataSet().searchNodes(bbox);
    9090    }
    9191   
  • applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/TagValues.java

    r30737 r32474  
    5454        // get values
    5555        List<String> tagValues = new ArrayList<>();
    56         List<AutoCompletionListItem> values = Main.main.getCurrentDataSet().getAutoCompletionManager().getValues(m_strTag);
     56        List<AutoCompletionListItem> values = Main.getLayerManager().getEditDataSet().getAutoCompletionManager().getValues(m_strTag);
    5757        for ( AutoCompletionListItem i : values ) {
    5858                tagValues.add(i.getValue());
  • applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/TracerAction.java

    r30927 r32474  
    2727import java.awt.event.InputEvent;
    2828import java.awt.event.KeyEvent;
     29import java.awt.event.KeyListener;
    2930import java.awt.event.MouseEvent;
    3031import java.awt.event.MouseListener;
    31 import java.awt.event.KeyListener;
    3232import java.util.ArrayList;
    3333import java.util.Collection;
     
    3838import javax.swing.JOptionPane;
    3939
    40 import org.xml.sax.SAXException;
    4140import org.openstreetmap.josm.Main;
    4241import org.openstreetmap.josm.actions.mapmode.MapMode;
    43 import org.openstreetmap.josm.command.AddCommand;
    4442import org.openstreetmap.josm.command.ChangePropertyCommand;
    4543import org.openstreetmap.josm.command.Command;
     
    4745import org.openstreetmap.josm.data.coor.LatLon;
    4846import org.openstreetmap.josm.data.osm.Node;
     47import org.openstreetmap.josm.data.osm.OsmPrimitive;
    4948import org.openstreetmap.josm.data.osm.Way;
     49import org.openstreetmap.josm.gui.MapFrame;
    5050import org.openstreetmap.josm.gui.PleaseWaitRunnable;
    5151import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    52 import org.openstreetmap.josm.gui.MapFrame;
    5352import org.openstreetmap.josm.plugins.tracer2.preferences.ServerParam;
    5453import org.openstreetmap.josm.plugins.tracer2.preferences.ServerParamList;
    5554import org.openstreetmap.josm.plugins.tracer2.preferences.ServerParamSelectDialog;
     55import org.openstreetmap.josm.plugins.tracer2.server.GetTrace;
    5656import org.openstreetmap.josm.plugins.tracer2.server.GetVersion;
    57 import org.openstreetmap.josm.plugins.tracer2.server.GetTrace;
    5857import org.openstreetmap.josm.tools.ImageProvider;
    5958import org.openstreetmap.josm.tools.Shortcut;
    60 import org.openstreetmap.josm.data.osm.OsmPrimitive;
     59import org.xml.sax.SAXException;
    6160
    6261class TracerAction extends MapMode implements MouseListener, KeyListener {
     
    8281        //System.out.println("keyPressed: key:" + e.getKeyChar() + " code" + e.getKeyCode() + " Loc" + e.getKeyLocation()+ " ID" + KeyEvent.getKeyText(e.getKeyCode()));
    8382       
    84         Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
     83        Collection<OsmPrimitive> selection = getLayerManager().getEditDataSet().getSelected();
    8584        List<Command> commands = new ArrayList<>();
    8685       
     
    340339               
    341340                if (m_bShift) {
    342                     Main.main.getCurrentDataSet().addSelected(ConnectWays.s_oWay);
     341                    getLayerManager().getEditDataSet().addSelected(ConnectWays.s_oWay);
    343342                } else {
    344                     Main.main.getCurrentDataSet().setSelected(ConnectWays.s_oWay);
     343                    getLayerManager().getEditDataSet().setSelected(ConnectWays.s_oWay);
    345344                }
    346345            } else {
Note: See TracChangeset for help on using the changeset viewer.