Ignore:
Timestamp:
2017-10-27T01:29:14+02:00 (7 years ago)
Author:
donvip
Message:

update to JOSM 12636

Location:
applications/editors/josm/plugins/public_transport
Files:
13 edited

Legend:

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

    r32680 r33737  
    55    <property name="commit.message" value="Commit message"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="10580"/>
     7    <property name="plugin.main.version" value="12636"/>
    88
    99    <property name="plugin.author" value="Roland M. Olbricht"/>
  • applications/editors/josm/plugins/public_transport/src/public_transport/AbstractGTFSCatchJoinCommand.java

    r33053 r33737  
    99import java.util.List;
    1010
    11 import org.openstreetmap.josm.Main;
    1211import org.openstreetmap.josm.command.Command;
    1312import org.openstreetmap.josm.data.osm.DataSet;
    1413import org.openstreetmap.josm.data.osm.Node;
    1514import org.openstreetmap.josm.data.osm.OsmPrimitive;
     15import org.openstreetmap.josm.gui.MainApplication;
    1616
    1717public abstract class AbstractGTFSCatchJoinCommand extends Command {
     
    4545            return false;
    4646        Node dest = null;
    47         DataSet ds = Main.getLayerManager().getEditDataSet();
     47        DataSet ds = MainApplication.getLayerManager().getEditDataSet();
    4848        Iterator<Node> iter = ds.getSelectedNodes().iterator();
    4949        int j = workingLines.get(0);
     
    8888        int j = workingLines.get(0);
    8989
    90         DataSet ds = Main.getLayerManager().getEditDataSet();
     90        DataSet ds = MainApplication.getLayerManager().getEditDataSet();
    9191        Node node = gtfsStopTM.nodes.elementAt(j);
    9292        if (node != null) {
  • applications/editors/josm/plugins/public_transport/src/public_transport/GTFSAddCommand.java

    r33053 r33737  
    77import java.util.Vector;
    88
    9 import org.openstreetmap.josm.Main;
    109import org.openstreetmap.josm.command.Command;
    1110import org.openstreetmap.josm.data.osm.Node;
    1211import org.openstreetmap.josm.data.osm.OsmPrimitive;
     12import org.openstreetmap.josm.gui.MainApplication;
    1313
    1414public class GTFSAddCommand extends Command {
     
    7070            if (node == null)
    7171                continue;
    72             Main.getLayerManager().getEditDataSet().removePrimitive(node);
     72            MainApplication.getLayerManager().getEditDataSet().removePrimitive(node);
    7373            node.setDeleted(true);
    7474        }
  • applications/editors/josm/plugins/public_transport/src/public_transport/GTFSDeleteCommand.java

    r33053 r33737  
    77import java.util.Vector;
    88
    9 import org.openstreetmap.josm.Main;
    109import org.openstreetmap.josm.command.Command;
    1110import org.openstreetmap.josm.data.osm.Node;
    1211import org.openstreetmap.josm.data.osm.OsmPrimitive;
     12import org.openstreetmap.josm.gui.MainApplication;
    1313
    1414public class GTFSDeleteCommand extends Command {
     
    6060            gtfsStopTM.nodes.set(j, null);
    6161            gtfsStopTM.setValueAt(tr("skipped"), j, 2);
    62             Main.getLayerManager().getEditDataSet().removePrimitive(node);
     62            MainApplication.getLayerManager().getEditDataSet().removePrimitive(node);
    6363            node.setDeleted(true);
    6464        }
     
    7676                continue;
    7777            node.setDeleted(false);
    78             Main.getLayerManager().getEditDataSet().addPrimitive(node);
     78            MainApplication.getLayerManager().getEditDataSet().addPrimitive(node);
    7979        }
    8080    }
  • applications/editors/josm/plugins/public_transport/src/public_transport/GTFSImporterAction.java

    r33053 r33737  
    3030import org.openstreetmap.josm.data.osm.OsmPrimitive;
    3131import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
     32import org.openstreetmap.josm.gui.MainApplication;
    3233
    3334public class GTFSImporterAction extends JosmAction {
     
    172173            Vector<Node> existingStops = new Vector<>();
    173174
    174             DataSet ds = Main.getLayerManager().getEditDataSet();
     175            DataSet ds = MainApplication.getLayerManager().getEditDataSet();
    175176            if (ds == null) {
    176177                JOptionPane.showMessageDialog(null,
     
    236237        node.put("stop_id", id);
    237238        node.put("name", name);
    238         DataSet ds = Main.getLayerManager().getEditDataSet();
     239        DataSet ds = MainApplication.getLayerManager().getEditDataSet();
    239240        if (ds == null) {
    240241            JOptionPane.showMessageDialog(null,
     
    269270    /** marks the table items whose nodes are marked on the map */
    270271    public static void findNodesInTable(JTable table, Vector<Node> nodes) {
    271         DataSet ds = Main.getLayerManager().getEditDataSet();
     272        DataSet ds = MainApplication.getLayerManager().getEditDataSet();
    272273        if (ds == null)
    273274            return;
     
    305306    public static void markNodesFromTable(JTable table, Vector<Node> nodes) {
    306307        OsmPrimitive[] osmp = {null};
    307         DataSet ds = Main.getLayerManager().getEditDataSet();
     308        DataSet ds = MainApplication.getLayerManager().getEditDataSet();
    308309        ds.setSelected(osmp);
    309310        Vector<Integer> consideredLines = getConsideredLines(table);
  • applications/editors/josm/plugins/public_transport/src/public_transport/GTFSStopTableModel.java

    r33166 r33737  
    1111import javax.swing.table.DefaultTableModel;
    1212
    13 import org.openstreetmap.josm.Main;
    1413import org.openstreetmap.josm.data.DataSource;
    1514import org.openstreetmap.josm.data.coor.LatLon;
    1615import org.openstreetmap.josm.data.osm.DataSet;
    1716import org.openstreetmap.josm.data.osm.Node;
     17import org.openstreetmap.josm.gui.MainApplication;
    1818
    1919public class GTFSStopTableModel extends DefaultTableModel implements TableModelListener {
     
    162162        LatLon coor = new LatLon(lat, lon);
    163163
    164         DataSet ds = Main.getLayerManager().getEditDataSet();
     164        DataSet ds = MainApplication.getLayerManager().getEditDataSet();
    165165        if (ds != null) {
    166166            boolean inside = false;
  • applications/editors/josm/plugins/public_transport/src/public_transport/PublicTransportAStar.java

    r33053 r33737  
    88import java.util.Vector;
    99
    10 import org.openstreetmap.josm.Main;
    1110import org.openstreetmap.josm.data.osm.Node;
    1211import org.openstreetmap.josm.data.osm.Way;
     12import org.openstreetmap.josm.gui.MainApplication;
    1313
    1414public class PublicTransportAStar extends AStarAlgorithm {
     
    8787            waysPerNode = new TreeMap<>();
    8888
    89             Iterator<Way> iter = Main.getLayerManager().getEditDataSet().getWays().iterator();
     89            Iterator<Way> iter = MainApplication.getLayerManager().getEditDataSet().getWays().iterator();
    9090            while (iter.hasNext()) {
    9191                Way way = iter.next();
  • applications/editors/josm/plugins/public_transport/src/public_transport/RoutePatternAction.java

    r33053 r33737  
    5353import org.openstreetmap.josm.data.osm.Way;
    5454import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
     55import org.openstreetmap.josm.gui.MainApplication;
    5556
    5657public class RoutePatternAction extends JosmAction {
     
    331332    public void actionPerformed(ActionEvent event) {
    332333        Frame frame = JOptionPane.getFrameForComponent(Main.parent);
    333         DataSet mainDataSet = Main.getLayerManager().getEditDataSet();
     334        DataSet mainDataSet = MainApplication.getLayerManager().getEditDataSet();
    334335
    335336        if (jDialog == null) {
     
    10571058             */
    10581059        } else if ("routePattern.overviewDelete".equals(event.getActionCommand())) {
    1059             DeleteAction.deleteRelation(Main.getLayerManager().getEditLayer(), currentRoute);
     1060            DeleteAction.deleteRelation(MainApplication.getLayerManager().getEditLayer(), currentRoute);
    10601061
    10611062            currentRoute = null;
     
    11041105        } else if ("routePattern.itineraryMark".equals(event.getActionCommand())) {
    11051106            OsmPrimitive[] osmp = {null};
    1106             Main.getLayerManager().getEditDataSet().setSelected(osmp);
     1107            MainApplication.getLayerManager().getEditDataSet().setSelected(osmp);
    11071108            markedWays.clear();
    11081109            if (itineraryTable.getSelectedRowCount() > 0) {
     
    13341335        } else if ("routePattern.stoplistMark".equals(event.getActionCommand())) {
    13351336            OsmPrimitive[] osmp = {null};
    1336             Main.getLayerManager().getEditDataSet().setSelected(osmp);
     1337            MainApplication.getLayerManager().getEditDataSet().setSelected(osmp);
    13371338            markedNodes.clear();
    13381339            if (stoplistTable.getSelectedRowCount() > 0) {
     
    15261527            // Determine for each member its position on the itinerary: position means here the
    15271528            // point on the itinerary that has minimal distance to the coor
    1528             mainDataSet = Main.getLayerManager().getEditDataSet();
     1529            mainDataSet = MainApplication.getLayerManager().getEditDataSet();
    15291530            if (mainDataSet != null) {
    15301531                String stopKey = "";
     
    15961597        currentRoute = copy;
    15971598
    1598         DataSet mainDataSet = Main.getLayerManager().getEditDataSet();
     1599        DataSet mainDataSet = MainApplication.getLayerManager().getEditDataSet();
    15991600        if (mainDataSet != null) {
    16001601            Vector<RouteReference> relRefs = new Vector<>();
  • applications/editors/josm/plugins/public_transport/src/public_transport/StopImporterAction.java

    r33053 r33737  
    3434import org.openstreetmap.josm.data.osm.OsmPrimitive;
    3535import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
     36import org.openstreetmap.josm.gui.MainApplication;
    3637import org.openstreetmap.josm.io.GpxReader;
    3738import org.xml.sax.SAXException;
     
    243244        setTagsWrtType(node, type);
    244245        node.put("name", name);
    245         DataSet ds = Main.getLayerManager().getEditDataSet();
     246        DataSet ds = MainApplication.getLayerManager().getEditDataSet();
    246247        if (ds == null) {
    247248            JOptionPane.showMessageDialog(null,
     
    292293    /** marks the table items whose nodes are marked on the map */
    293294    public static void findNodesInTable(JTable table, Vector<Node> nodes) {
    294         DataSet ds = Main.getLayerManager().getEditDataSet();
     295        DataSet ds = MainApplication.getLayerManager().getEditDataSet();
    295296        if (ds == null)
    296297            return;
     
    326327    public static void markNodesFromTable(JTable table, Vector<Node> nodes) {
    327328        OsmPrimitive[] osmp = {null};
    328         DataSet ds = Main.getLayerManager().getEditDataSet();
     329        DataSet ds = MainApplication.getLayerManager().getEditDataSet();
    329330        ds.setSelected(osmp);
    330331        Vector<Integer> consideredLines = getConsideredLines(table);
  • applications/editors/josm/plugins/public_transport/src/public_transport/TrackStoplistDeleteCommand.java

    r33053 r33737  
    77import java.util.Vector;
    88
    9 import org.openstreetmap.josm.Main;
    109import org.openstreetmap.josm.command.Command;
    1110import org.openstreetmap.josm.data.osm.Node;
    1211import org.openstreetmap.josm.data.osm.OsmPrimitive;
     12import org.openstreetmap.josm.gui.MainApplication;
    1313
    1414public class TrackStoplistDeleteCommand extends Command {
     
    6565            if (node == null)
    6666                continue;
    67             Main.getLayerManager().getEditDataSet().removePrimitive(node);
     67            MainApplication.getLayerManager().getEditDataSet().removePrimitive(node);
    6868            node.setDeleted(true);
    6969        }
     
    8080                continue;
    8181            ntn.node.setDeleted(false);
    82             Main.getLayerManager().getEditDataSet().addPrimitive(ntn.node);
     82            MainApplication.getLayerManager().getEditDataSet().addPrimitive(ntn.node);
    8383        }
    8484    }
  • applications/editors/josm/plugins/public_transport/src/public_transport/TrackSuggestStopsCommand.java

    r33053 r33737  
    88import java.util.Vector;
    99
    10 import org.openstreetmap.josm.Main;
    1110import org.openstreetmap.josm.command.Command;
    1211import org.openstreetmap.josm.data.coor.LatLon;
     
    1514import org.openstreetmap.josm.data.osm.Node;
    1615import org.openstreetmap.josm.data.osm.OsmPrimitive;
     16import org.openstreetmap.josm.gui.MainApplication;
    1717
    1818public class TrackSuggestStopsCommand extends Command {
     
    6565            if (node == null)
    6666                continue;
    67             Main.getLayerManager().getEditDataSet().removePrimitive(node);
     67            MainApplication.getLayerManager().getEditDataSet().removePrimitive(node);
    6868            node.setDeleted(true);
    6969        }
     
    173173            if (node == null)
    174174                continue;
    175             Main.getLayerManager().getEditDataSet().removePrimitive(node);
     175            MainApplication.getLayerManager().getEditDataSet().removePrimitive(node);
    176176            node.setDeleted(true);
    177177        }
     
    186186                continue;
    187187            node.setDeleted(false);
    188             Main.getLayerManager().getEditDataSet().addPrimitive(node);
     188            MainApplication.getLayerManager().getEditDataSet().addPrimitive(node);
    189189        }
    190190    }
  • applications/editors/josm/plugins/public_transport/src/public_transport/WaypointsDisableCommand.java

    r33053 r33737  
    77import java.util.Vector;
    88
    9 import org.openstreetmap.josm.Main;
    109import org.openstreetmap.josm.command.Command;
    1110import org.openstreetmap.josm.data.osm.Node;
    1211import org.openstreetmap.josm.data.osm.OsmPrimitive;
     12import org.openstreetmap.josm.gui.MainApplication;
    1313
    1414public class WaypointsDisableCommand extends Command {
     
    5454                continue;
    5555            waypointTM.nodes.set(j, null);
    56             Main.getLayerManager().getEditDataSet().removePrimitive(node);
     56            MainApplication.getLayerManager().getEditDataSet().removePrimitive(node);
    5757            node.setDeleted(true);
    5858        }
     
    6969                continue;
    7070            node.setDeleted(false);
    71             Main.getLayerManager().getEditDataSet().addPrimitive(node);
     71            MainApplication.getLayerManager().getEditDataSet().addPrimitive(node);
    7272        }
    7373    }
  • applications/editors/josm/plugins/public_transport/src/public_transport/WaypointsEnableCommand.java

    r33053 r33737  
    77import java.util.Vector;
    88
    9 import org.openstreetmap.josm.Main;
    109import org.openstreetmap.josm.command.Command;
    1110import org.openstreetmap.josm.data.osm.Node;
    1211import org.openstreetmap.josm.data.osm.OsmPrimitive;
     12import org.openstreetmap.josm.gui.MainApplication;
    1313
    1414public class WaypointsEnableCommand extends Command {
     
    6565            if (node == null)
    6666                continue;
    67             Main.getLayerManager().getEditDataSet().removePrimitive(node);
     67            MainApplication.getLayerManager().getEditDataSet().removePrimitive(node);
    6868            node.setDeleted(true);
    6969        }
Note: See TracChangeset for help on using the changeset viewer.