Changeset 33053 in osm for applications/editors


Ignore:
Timestamp:
2016-11-12T04:29:54+01:00 (8 years ago)
Author:
donvip
Message:

checkstyle

Location:
applications/editors/josm/plugins/public_transport
Files:
3 added
34 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/public_transport/.project

    r31995 r33053  
    1616                        </arguments>
    1717                </buildCommand>
     18                <buildCommand>
     19                        <name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
     20                        <arguments>
     21                        </arguments>
     22                </buildCommand>
    1823        </buildSpec>
    1924        <natures>
    2025                <nature>org.sonarlint.eclipse.core.sonarlintNature</nature>
    2126                <nature>org.eclipse.jdt.core.javanature</nature>
     27                <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
    2228        </natures>
    2329</projectDescription>
  • applications/editors/josm/plugins/public_transport/.settings/org.eclipse.jdt.ui.prefs

    r30740 r33053  
    3636sp_cleanup.remove_private_constructors=true
    3737sp_cleanup.remove_redundant_type_arguments=true
    38 sp_cleanup.remove_trailing_whitespaces=false
     38sp_cleanup.remove_trailing_whitespaces=true
    3939sp_cleanup.remove_trailing_whitespaces_all=true
    4040sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
  • applications/editors/josm/plugins/public_transport/src/public_transport/AStarAlgorithm.java

    r32357 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    1112    // AStarAlgorithm.
    1213
    13     public static abstract class Vertex implements Comparable<Vertex> {
     14    public abstract static class Vertex implements Comparable<Vertex> {
    1415        @Override
    1516        public abstract int compareTo(Vertex v);
    16     };
     17    }
    1718
    18     public static abstract class Edge {
     19    public abstract static class Edge {
    1920        public abstract Vertex getBegin();
    2021
     
    2223
    2324        public abstract double getLength();
    24     };
     25    }
    2526
    2627    public abstract Vector<Edge> getNeighbors(Vertex vertex);
     
    103104
    104105        Vector<Edge> result = new Vector<>();
    105         for (int i = backwards.size() - 1; i >= 0; --i)
     106        for (int i = backwards.size() - 1; i >= 0; --i) {
    106107            result.add(backwards.elementAt(i));
     108        }
    107109        return result;
    108110    }
  • applications/editors/josm/plugins/public_transport/src/public_transport/AbstractGTFSCatchJoinCommand.java

    r33010 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    2425
    2526    private String type = null;
    26    
     27
    2728    private final boolean isCatch;
    2829
  • applications/editors/josm/plugins/public_transport/src/public_transport/AbstractImporterDialog.java

    r32902 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    2021public abstract class AbstractImporterDialog<T extends JosmAction> {
    2122
    22     private static final String[] stoptypes = new String[] { marktr("bus"), marktr("tram"),
    23             marktr("light_rail"), marktr("subway"), marktr("rail") };
     23    private static final String[] stoptypes = new String[] {
     24            marktr("bus"),
     25            marktr("tram"),
     26            marktr("light_rail"),
     27            marktr("subway"),
     28            marktr("rail") };
    2429
    2530    private final JDialog jDialog;
     
    4550        cbStoptype = new JComboBox<>();
    4651        cbStoptype.setEditable(false);
    47         for (String type : stoptypes)
     52        for (String type : stoptypes) {
    4853            cbStoptype.addItem(new TransText(type));
     54        }
    4955        cbStoptype.setActionCommand(actionPrefix + ".settingsStoptype");
    5056        cbStoptype.addActionListener(controller);
  • applications/editors/josm/plugins/public_transport/src/public_transport/GTFSAddCommand.java

    r32902 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    3031        Vector<Integer> consideredLines = new Vector<>();
    3132        if (selectedLines.length > 0) {
    32             for (int i = 0; i < selectedLines.length; ++i)
     33            for (int i = 0; i < selectedLines.length; ++i) {
    3334                consideredLines.add(selectedLines[i]);
     35            }
    3436        } else {
    35             for (int i = 0; i < gtfsStopTM.getRowCount(); ++i)
     37            for (int i = 0; i < gtfsStopTM.getRowCount(); ++i) {
    3638                consideredLines.add(Integer.valueOf(i));
     39            }
    3740        }
    3841
  • applications/editors/josm/plugins/public_transport/src/public_transport/GTFSCatchCommand.java

    r33010 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
  • applications/editors/josm/plugins/public_transport/src/public_transport/GTFSDeleteCommand.java

    r32902 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    3031        Vector<Integer> consideredLines = new Vector<>();
    3132        if (selectedLines.length > 0) {
    32             for (int i = 0; i < selectedLines.length; ++i)
     33            for (int i = 0; i < selectedLines.length; ++i) {
    3334                consideredLines.add(selectedLines[i]);
     35            }
    3436        } else {
    35             for (int i = 0; i < gtfsStopTM.getRowCount(); ++i)
     37            for (int i = 0; i < gtfsStopTM.getRowCount(); ++i) {
    3638                consideredLines.add(Integer.valueOf(i));
     39            }
    3740        }
    3841
  • applications/editors/josm/plugins/public_transport/src/public_transport/GTFSImporterAction.java

    r32902 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    9899
    99100            refreshData();
    100         }
    101 /*    else if ("stopImporter.settingsGPSTimeStart".equals(event.getActionCommand()))
     101
     102/*    } else if ("stopImporter.settingsGPSTimeStart".equals(event.getActionCommand()))
    102103    {
    103104      if ((!inEvent) && (dialog.gpsTimeStartValid()) && (currentTrack != null))
     
    131132      Main.main.undoRedo.add(new TrackStoplistDetachCommand(this));
    132133      dialog.getStoplistTable().clearSelection();
    133     }*/
    134         else if ("gtfsImporter.gtfsStopsAdd".equals(event.getActionCommand()))
     134    */
     135        } else if ("gtfsImporter.gtfsStopsAdd".equals(event.getActionCommand()))
    135136            Main.main.undoRedo.add(new GTFSAddCommand(this));
    136137        else if ("gtfsImporter.gtfsStopsDelete".equals(event.getActionCommand()))
     
    155156                data.clear();
    156157
    157             while (r.ready())
     158            while (r.ready()) {
    158159                data.add(r.readLine());
     160            }
    159161        } catch (FileNotFoundException e) {
    160162            Main.error(e);
     
    254256        Vector<Integer> consideredLines = new Vector<>();
    255257        if (selectedLines.length > 0) {
    256             for (int i = 0; i < selectedLines.length; ++i)
     258            for (int i = 0; i < selectedLines.length; ++i) {
    257259                consideredLines.add(selectedLines[i]);
     260            }
    258261        } else {
    259             for (int i = 0; i < table.getRowCount(); ++i)
     262            for (int i = 0; i < table.getRowCount(); ++i) {
    260263                consideredLines.add(Integer.valueOf(i));
     264            }
    261265        }
    262266        return consideredLines;
     
    278282
    279283    /**
    280      * shows the nodes that correspond to the marked lines in the table. 
     284     * shows the nodes that correspond to the marked lines in the table.
    281285     * If no lines are marked in the table, show all nodes from the vector
    282286     */
     
    296300
    297301    /**
    298      * marks the nodes that correspond to the marked lines in the table. 
     302     * marks the nodes that correspond to the marked lines in the table.
    299303     * If no lines are marked in the table, mark all nodes from the vector
    300304     */
    301305    public static void markNodesFromTable(JTable table, Vector<Node> nodes) {
    302         OsmPrimitive[] osmp = { null };
     306        OsmPrimitive[] osmp = {null};
    303307        DataSet ds = Main.getLayerManager().getEditDataSet();
    304308        ds.setSelected(osmp);
  • applications/editors/josm/plugins/public_transport/src/public_transport/GTFSImporterDialog.java

    r32357 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
  • applications/editors/josm/plugins/public_transport/src/public_transport/GTFSJoinCommand.java

    r33010 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
  • applications/editors/josm/plugins/public_transport/src/public_transport/GTFSStopTableModel.java

    r32357 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    1920    private GTFSImporterAction controller = null;
    2021
    21     public Vector<Node> nodes = new Vector<Node>();
    22 
    23     public Vector<LatLon> coors = new Vector<LatLon>();
     22    public Vector<Node> nodes = new Vector<>();
     23
     24    public Vector<LatLon> coors = new Vector<>();
    2425
    2526    private int idCol = -1;
     
    99100    }
    100101
    101     /*
    102      * tokenizes a line as follows: any comma outside a pair of double quotation marks is taken as field separator. In particular, neither \" nor \,
    103      * have a special meaning. Returns the position of the next field separator, if any. Otherwise it returns -1. s - the string to tokenize. startPos
     102    /**
     103     * tokenizes a line as follows: any comma outside a pair of double quotation marks is taken as field separator.
     104     * In particular, neither \" nor \, have a special meaning. Returns the position of the next field separator, if any.
     105     * Otherwise it returns -1. s - the string to tokenize. startPos
    104106     * - the position of the last field separator plus 1 or the value 0.
    105107     */
     
    130132
    131133    public void insertRow(int insPos, String s, Vector<Node> existingStops) {
    132         String[] buf = { "", "", tr("pending") };
     134        String[] buf = {"", "", tr("pending")};
    133135        int pos = tokenize(s, 0);
    134136        int oldPos = 0;
  • applications/editors/josm/plugins/public_transport/src/public_transport/ItineraryTableModel.java

    r32902 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    4849
    4950    public void insertRow(int insPos, Way way, String role) {
    50         String[] buf = { "", "" };
     51        String[] buf = {"", ""};
    5152        String curName = way.get("name");
    5253        if (way.isIncomplete())
     
    99100                --i;
    100101            } else if ((i > 0) && gapRequired && (ways.elementAt(i - 1) != null)) {
    101                 String[] buf = { "", "" };
     102                String[] buf = {"", ""};
    102103                buf[0] = tr("[gap]");
    103104                insertRow(i, buf);
  • applications/editors/josm/plugins/public_transport/src/public_transport/PublicTransportAStar.java

    r32902 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    3233            return node.equals(((NodeVertex) o).node);
    3334        }
    34        
     35
    3536        @Override
    3637        public int hashCode() {
     
    6869
    6970            double totalDistance = 0;
    70             for (int i = min; i < max; ++i)
    71                 totalDistance += way.getNode(i).getCoor()
    72                         .greatCircleDistance(way.getNode(i + 1).getCoor());
     71            for (int i = min; i < max; ++i) {
     72                totalDistance += way.getNode(i).getCoor().greatCircleDistance(way.getNode(i + 1).getCoor());
     73            }
    7374            return totalDistance;
    7475        }
     
    140141                .greatCircleDistance(nodeVertex.node.getCoor());
    141142    }
    142 };
     143}
  • applications/editors/josm/plugins/public_transport/src/public_transport/PublicTransportPlugin.java

    r32357 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
  • applications/editors/josm/plugins/public_transport/src/public_transport/RoutePatternAction.java

    r32902 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    6061        RoutePatternAction root = null;
    6162
    62         public RoutesLSL(RoutePatternAction rpa) {
     63        RoutesLSL(RoutePatternAction rpa) {
    6364            root = rpa;
    6465        }
     
    7071    }
    7172
    72     private static class RouteReference implements Comparable<RouteReference> {
    73         Relation route;
    74 
    75         public RouteReference(Relation route) {
    76             this.route = route;
    77         }
    78 
    79         @Override
    80         public int compareTo(RouteReference rr) {
    81             if (route.get("route") != null) {
    82                 if (rr.route.get("route") == null)
    83                     return -1;
    84                 int result = route.get("route").compareTo(rr.route.get("route"));
    85                 if (result != 0)
    86                     return result;
    87             } else if (rr.route.get("route") != null)
    88                 return 1;
    89             if (route.get("ref") != null) {
    90                 if (rr.route.get("ref") == null)
    91                     return -1;
    92                 int result = route.get("ref").compareTo(rr.route.get("ref"));
    93                 if (result != 0)
    94                     return result;
    95             } else if (rr.route.get("ref") != null)
    96                 return 1;
    97             if (route.get("to") != null) {
    98                 if (rr.route.get("to") == null)
    99                     return -1;
    100                 int result = route.get("to").compareTo(rr.route.get("to"));
    101                 if (result != 0)
    102                     return result;
    103             } else if (rr.route.get("to") != null)
    104                 return 1;
    105             if (route.get("direction") != null) {
    106                 if (rr.route.get("direction") == null)
    107                     return -1;
    108                 int result = route.get("direction").compareTo(rr.route.get("direction"));
    109                 if (result != 0)
    110                     return result;
    111             } else if (rr.route.get("direction") != null)
    112                 return 1;
    113             if (route.getId() < rr.route.getId())
    114                 return -1;
    115             else if (route.getId() > rr.route.getId())
    116                 return 1;
    117             return 0;
    118         }
    119 
    120         @Override
    121         public String toString() {
    122             String buf = route.get("route");
    123             if ((route.get("ref") != null) && (route.get("ref") != "")) {
    124                 buf += " " + route.get("ref");
    125             }
    126             if ((route.get("loc_ref") != null) && (route.get("loc_ref") != "")) {
    127                 buf += " [" + route.get("loc_ref") + "]";
    128             }
    129 
    130             if ((route.get("to") != null) && (route.get("to") != "")) {
    131                 buf += ": " + route.get("to");
    132             } else if ((route.get("direction") != null) && (route.get("direction") != "")) {
    133                 buf += " " + route.get("ref") + ": " + route.get("direction");
    134             } else {
    135                 buf += " " + route.get("ref");
    136             }
    137             buf += tr(" [ID] {0}", Long.toString(route.getId()));
    138 
    139             return buf;
    140         }
    141     }
    142 
    14373    private static class TagTableModel extends DefaultTableModel implements TableModelListener {
    14474        Relation relation = null;
     
    14878        boolean hasFixedKeys = true;
    14979
    150         public TagTableModel(boolean hasFixedKeys) {
     80        TagTableModel(boolean hasFixedKeys) {
    15181            this.hasFixedKeys = hasFixedKeys;
    15282        }
     
    221151        TreeMap<Integer, TableCellEditor> col2 = null;
    222152
    223         public CustomCellEditorTable() {
     153        CustomCellEditorTable() {
    224154            col1 = new TreeMap<>();
    225155            col2 = new TreeMap<>();
     
    273203
    274204        public void insertRow(int insPos, Node node, String role, double distance) {
    275             String[] buf = { "", "", "", "" };
     205            String[] buf = {"", "", "", ""};
    276206            String curName = node.get("name");
    277207            if (curName != null) {
     
    320250        public double distance;
    321251
    322         public SegmentMetric(double fromLat, double fromLon, double toLat, double toLon,
     252        SegmentMetric(double fromLat, double fromLon, double toLat, double toLon,
    323253                double distance) {
    324254            this.distance = distance;
     
    344274            d2 = d2 * Math.cos(fromLat * Math.PI / 180.0);
    345275            o2 = o2 * Math.cos(fromLat * Math.PI / 180.0);
    346         }
    347     }
    348 
    349     private static class StopReference implements Comparable<StopReference> {
    350         public int index = 0;
    351 
    352         public double pos = 0;
    353 
    354         public double distance = 0;
    355 
    356         public String name = "";
    357 
    358         public String role = "";
    359 
    360         public Node node;
    361 
    362         public StopReference(int inIndex, double inPos, double inDistance, String inName,
    363                 String inRole, Node inNode) {
    364             index = inIndex;
    365             pos = inPos;
    366             distance = inDistance;
    367             name = inName;
    368             role = inRole;
    369             node = inNode;
    370         }
    371 
    372         @Override
    373         public int compareTo(StopReference sr) {
    374             if (this.index < sr.index)
    375                 return -1;
    376             if (this.index > sr.index)
    377                 return 1;
    378             if (this.pos < sr.pos)
    379                 return -1;
    380             if (this.pos > sr.pos)
    381                 return 1;
    382             return 0;
    383276        }
    384277    }
     
    480373            relsList = new JList<>(relsListModel);
    481374            JScrollPane rpListSP = new JScrollPane(relsList);
    482             String[] data = { "1", "2", "3", "4", "5", "6" };
     375            String[] data = {"1", "2", "3", "4", "5", "6"};
    483376            relsListModel.copyInto(data);
    484377            relsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
     
    11411034
    11421035            currentRoute.setMembers(null);
    1143             for (int i = itemsToReflect.size() - 1; i >= 0; --i)
     1036            for (int i = itemsToReflect.size() - 1; i >= 0; --i) {
    11441037                currentRoute.addMember(itemsToReflect.elementAt(i));
    1145             for (int i = 0; i < otherItems.size(); ++i)
     1038            }
     1039            for (int i = 0; i < otherItems.size(); ++i) {
    11461040                currentRoute.addMember(otherItems.elementAt(i));
     1041            }
    11471042
    11481043            refreshData();
     
    11551050            // Temp
    11561051            /*
    1157              * if (firstNode != null) { Vector< AStarAlgorithm.Edge > path = new PublicTransportAStar(firstNode, lastNode).shortestPath(); Iterator<
     1052             * if (firstNode != null) {
     1053             * Vector< AStarAlgorithm.Edge > path = new PublicTransportAStar(firstNode, lastNode).shortestPath(); Iterator<
    11581054             * AStarAlgorithm.Edge > iter = path.iterator(); while (iter.hasNext()) { PublicTransportAStar.PartialWayEdge edge =
    11591055             * (PublicTransportAStar.PartialWayEdge)iter.next(); System.out.print(edge.way.getUniqueId()); System.out.print("\t");
     
    12071103            Main.map.mapView.zoomTo(box);
    12081104        } else if ("routePattern.itineraryMark".equals(event.getActionCommand())) {
    1209             OsmPrimitive[] osmp = { null };
     1105            OsmPrimitive[] osmp = {null};
    12101106            Main.getLayerManager().getEditDataSet().setSelected(osmp);
    12111107            markedWays.clear();
     
    12661162            if ((insPos > 0) && (insPos < itineraryData.getRowCount())) {
    12671163                while ((insPos < itineraryData.getRowCount())
    1268                         && (itineraryData.ways.elementAt(insPos) == null))
     1164                        && (itineraryData.ways.elementAt(insPos) == null)) {
    12691165                    ++insPos;
     1166                }
    12701167                itineraryTable.removeRowSelectionInterval(0, itineraryData.getRowCount() - 1);
    12711168                if (insPos < itineraryData.getRowCount())
     
    14361333            Main.map.mapView.zoomTo(box);
    14371334        } else if ("routePattern.stoplistMark".equals(event.getActionCommand())) {
    1438             OsmPrimitive[] osmp = { null };
     1335            OsmPrimitive[] osmp = {null};
    14391336            Main.getLayerManager().getEditDataSet().setSelected(osmp);
    14401337            markedNodes.clear();
     
    14971394            if ((insPos > 0) && (insPos < stoplistData.getRowCount())) {
    14981395                while ((insPos < stoplistData.getRowCount())
    1499                         && (stoplistData.nodes.elementAt(insPos) == null))
     1396                        && (stoplistData.nodes.elementAt(insPos) == null)) {
    15001397                    ++insPos;
     1398                }
    15011399                stoplistTable.removeRowSelectionInterval(0, stoplistData.getRowCount() - 1);
    15021400                if (insPos < stoplistData.getRowCount())
     
    17261624
    17271625            Iterator<RouteReference> iter = relRefs.iterator();
    1728             while (iter.hasNext())
     1626            while (iter.hasNext()) {
    17291627                relsListModel.addElement(iter.next());
     1628            }
    17301629        } else {
    17311630            JOptionPane.showMessageDialog(null,
  • applications/editors/josm/plugins/public_transport/src/public_transport/SettingsStoptypeCommand.java

    r32902 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    1415public class SettingsStoptypeCommand extends Command {
    1516    private static class HighwayRailway {
    16         public HighwayRailway(Node node) {
     17        HighwayRailway(Node node) {
    1718            this.node = node;
    1819            highway = node.get("highway");
  • applications/editors/josm/plugins/public_transport/src/public_transport/StopImporterAction.java

    r32902 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    199200
    200201            Iterator<TrackReference> iter = trackRefs.iterator();
    201             while (iter.hasNext())
     202            while (iter.hasNext()) {
    202203                tracksListModel.addElement(iter.next());
     204            }
    203205
    204206            waypointTM = new WaypointTableModel(this);
     
    277279        Vector<Integer> consideredLines = new Vector<>();
    278280        if (selectedLines.length > 0) {
    279             for (int i = 0; i < selectedLines.length; ++i)
     281            for (int i = 0; i < selectedLines.length; ++i) {
    280282                consideredLines.add(selectedLines[i]);
     283            }
    281284        } else {
    282             for (int i = 0; i < table.getRowCount(); ++i)
     285            for (int i = 0; i < table.getRowCount(); ++i) {
    283286                consideredLines.add(Integer.valueOf(i));
     287            }
    284288        }
    285289        return consideredLines;
     
    321325     */
    322326    public static void markNodesFromTable(JTable table, Vector<Node> nodes) {
    323         OsmPrimitive[] osmp = { null };
     327        OsmPrimitive[] osmp = {null};
    324328        DataSet ds = Main.getLayerManager().getEditDataSet();
    325329        ds.setSelected(osmp);
     
    415419        private String defaultShelter = null;
    416420
    417         public FocusWaypointShelterAction(String defaultShelter) {
     421        FocusWaypointShelterAction(String defaultShelter) {
    418422            this.defaultShelter = defaultShelter;
    419423        }
     
    461465        private String defaultShelter = null;
    462466
    463         public FocusTrackStoplistShelterAction(String defaultShelter) {
     467        FocusTrackStoplistShelterAction(String defaultShelter) {
    464468            this.defaultShelter = defaultShelter;
    465469        }
  • applications/editors/josm/plugins/public_transport/src/public_transport/StopImporterDialog.java

    r32357 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    6869        tracksList = new JList<>(tracksListModel);
    6970        JScrollPane rpListSP = new JScrollPane(tracksList);
    70         String[] data = { "1", "2", "3", "4", "5", "6" };
     71        String[] data = {"1", "2", "3", "4", "5", "6"};
    7172        tracksListModel.copyInto(data);
    7273        tracksList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
     
    537538        StopImporterAction root = null;
    538539
    539         public TracksLSL(StopImporterAction sia) {
     540        TracksLSL(StopImporterAction sia) {
    540541            root = sia;
    541542        }
     
    549550                root.tracksSelectionChanged(-1);
    550551        }
    551     };
     552    }
    552553}
  • applications/editors/josm/plugins/public_transport/src/public_transport/TrackReference.java

    r32357 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    181182        }
    182183    }
    183 };
     184}
  • applications/editors/josm/plugins/public_transport/src/public_transport/TrackStoplistAddCommand.java

    r32357 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
  • applications/editors/josm/plugins/public_transport/src/public_transport/TrackStoplistDeleteCommand.java

    r32902 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    4748            }
    4849        } else {
    49             for (int i = 0; i < stoplistTM.getRowCount(); ++i)
     50            for (int i = 0; i < stoplistTM.getRowCount(); ++i) {
    5051                workingLines.add(Integer.valueOf(i));
     52            }
    5153        }
    5254    }
     
    9193        return tr("Public Transport: Delete track stop");
    9294    }
    93 };
     95}
  • applications/editors/josm/plugins/public_transport/src/public_transport/TrackStoplistDetachCommand.java

    r32902 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    2627        Vector<Integer> consideredLines = new Vector<>();
    2728        if (selectedLines.length > 0) {
    28             for (int i = 0; i < selectedLines.length; ++i)
     29            for (int i = 0; i < selectedLines.length; ++i) {
    2930                consideredLines.add(selectedLines[i]);
     31            }
    3032        } else {
    31             for (int i = 0; i < stoplistTM.getRowCount(); ++i)
     33            for (int i = 0; i < stoplistTM.getRowCount(); ++i) {
    3234                consideredLines.add(Integer.valueOf(i));
     35            }
    3336        }
    3437
  • applications/editors/josm/plugins/public_transport/src/public_transport/TrackStoplistNameCommand.java

    r32357 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
  • applications/editors/josm/plugins/public_transport/src/public_transport/TrackStoplistRelocateCommand.java

    r32357 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
  • applications/editors/josm/plugins/public_transport/src/public_transport/TrackStoplistSortCommand.java

    r32902 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    3637        int[] selectedLines = controller.getDialog().getStoplistTable().getSelectedRows();
    3738        if (selectedLines.length > 0) {
    38             for (int i = 0; i < selectedLines.length; ++i)
     39            for (int i = 0; i < selectedLines.length; ++i) {
    3940                workingLines.add(selectedLines[i]);
     41            }
    4042        } else {
    41             for (int i = 0; i < stoplistTM.getRowCount(); ++i)
     43            for (int i = 0; i < stoplistTM.getRowCount(); ++i) {
    4244                workingLines.add(Integer.valueOf(i));
     45            }
    4346        }
    4447    }
     
    102105        public double startTime = 0;
    103106
    104         public NodeSortEntry(Node node, String time, String name, TransText shelter,
     107        NodeSortEntry(Node node, String time, String name, TransText shelter,
    105108                double startTime) {
    106109            this.node = node;
  • applications/editors/josm/plugins/public_transport/src/public_transport/TrackStoplistTableModel.java

    r32357 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    9394
    9495    public void insertRow(int insPos, Node node, String time, String name, TransText shelter) {
    95         Object[] buf = { time, name, shelter };
     96        Object[] buf = {time, name, shelter};
    9697        if (insPos == -1) {
    9798            nodes.addElement(node);
  • applications/editors/josm/plugins/public_transport/src/public_transport/TrackSuggestStopsCommand.java

    r32357 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    7374        while (siter.hasNext()) {
    7475            Iterator<WayPoint> witer = siter.next().getWayPoints().iterator();
    75             while (witer.hasNext())
     76            while (witer.hasNext()) {
    7677                wayPoints.add(witer.next());
     78            }
    7779        }
    7880        Vector<Double> wayPointsDist = new Vector<>(wayPoints.size());
  • applications/editors/josm/plugins/public_transport/src/public_transport/TransText.java

    r32357 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
  • applications/editors/josm/plugins/public_transport/src/public_transport/WaypointTableModel.java

    r32357 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    6263        Node node = controller.createNode(wp.getCoor(), name);
    6364
    64         Object[] buf = { time, name, new TransText(null) };
     65        Object[] buf = {time, name, new TransText(null)};
    6566        if (insPos == -1) {
    6667            nodes.addElement(node);
  • applications/editors/josm/plugins/public_transport/src/public_transport/WaypointsDetachCommand.java

    r32902 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    2627        Vector<Integer> consideredLines = new Vector<>();
    2728        if (selectedLines.length > 0) {
    28             for (int i = 0; i < selectedLines.length; ++i)
     29            for (int i = 0; i < selectedLines.length; ++i) {
    2930                consideredLines.add(selectedLines[i]);
     31            }
    3032        } else {
    31             for (int i = 0; i < waypointTM.getRowCount(); ++i)
     33            for (int i = 0; i < waypointTM.getRowCount(); ++i) {
    3234                consideredLines.add(Integer.valueOf(i));
     35            }
    3336        }
    3437
  • applications/editors/josm/plugins/public_transport/src/public_transport/WaypointsDisableCommand.java

    r32902 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    2728        Vector<Integer> consideredLines = new Vector<>();
    2829        if (selectedLines.length > 0) {
    29             for (int i = 0; i < selectedLines.length; ++i)
     30            for (int i = 0; i < selectedLines.length; ++i) {
    3031                consideredLines.add(selectedLines[i]);
     32            }
    3133        } else {
    32             for (int i = 0; i < waypointTM.getRowCount(); ++i)
     34            for (int i = 0; i < waypointTM.getRowCount(); ++i) {
    3335                consideredLines.add(Integer.valueOf(i));
     36            }
    3437        }
    3538
     
    7982        return tr("Public Transport: Disable waypoints");
    8083    }
    81 };
     84}
  • applications/editors/josm/plugins/public_transport/src/public_transport/WaypointsEnableCommand.java

    r32902 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
     
    2728        Vector<Integer> consideredLines = new Vector<>();
    2829        if (selectedLines.length > 0) {
    29             for (int i = 0; i < selectedLines.length; ++i)
     30            for (int i = 0; i < selectedLines.length; ++i) {
    3031                consideredLines.add(selectedLines[i]);
     32            }
    3133        } else {
    32             for (int i = 0; i < waypointTM.getRowCount(); ++i)
     34            for (int i = 0; i < waypointTM.getRowCount(); ++i) {
    3335                consideredLines.add(Integer.valueOf(i));
     36            }
    3437        }
    3538
  • applications/editors/josm/plugins/public_transport/src/public_transport/WaypointsNameCommand.java

    r32357 r33053  
     1// License: GPL. For details, see LICENSE file.
    12package public_transport;
    23
Note: See TracChangeset for help on using the changeset viewer.