Changeset 30737 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/Address.java
- Timestamp:
- 2014-10-18T23:07:52+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/Address.java
r29801 r30737 131 131 MapView mv = Main.map.mapView; 132 132 Point mousePos = e.getPoint(); 133 List<Way> mouseOnExistingWays = new ArrayList< Way>();134 List<Way> mouseOnExistingBuildingWays = new ArrayList< Way>();135 mouseOnExistingWays = new ArrayList< Way>();133 List<Way> mouseOnExistingWays = new ArrayList<>(); 134 List<Way> mouseOnExistingBuildingWays = new ArrayList<>(); 135 mouseOnExistingWays = new ArrayList<>(); 136 136 Node currentMouseNode = mv.getNearestNode(mousePos, OsmPrimitive.isSelectablePredicate); 137 137 if (currentMouseNode != null) { … … 144 144 && !inputStreet.getText().equals("")) { 145 145 // house number already present but not linked to a street 146 Collection<Command> cmds = new LinkedList< Command>();146 Collection<Command> cmds = new LinkedList<>(); 147 147 addStreetNameOrRelation(currentMouseNode, cmds); 148 148 Command c = new SequenceCommand("Add node address", cmds); … … 164 164 inputStreet.setText(currentMouseNode.get(tagHouseStreet)); 165 165 if (ctrl) { 166 Collection<Command> cmds = new LinkedList< Command>();166 Collection<Command> cmds = new LinkedList<>(); 167 167 addAddrToPrimitive(currentMouseNode, cmds); 168 168 if (num == null) … … 179 179 applyInputNumberChange(); 180 180 } 181 Collection<Command> cmds = new LinkedList< Command>();181 Collection<Command> cmds = new LinkedList<>(); 182 182 addAddrToPrimitive(currentMouseNode, cmds); 183 183 } else { … … 206 206 Toolkit.getDefaultToolkit().beep(); 207 207 } else { 208 Collection<Command> cmds = new LinkedList< Command>();208 Collection<Command> cmds = new LinkedList<>(); 209 209 if (ctrl) { 210 210 applyInputNumberChange(); … … 305 305 cmds.add(new AddCommand(n)); 306 306 List<WaySegment> wss = Main.map.mapView.getNearestWaySegments(e.getPoint(), OsmPrimitive.isSelectablePredicate); 307 Map<Way, List<Integer>> insertPoints = new HashMap< Way, List<Integer>>();307 Map<Way, List<Integer>> insertPoints = new HashMap<>(); 308 308 for (WaySegment ws : wss) { 309 309 List<Integer> is; … … 311 311 is = insertPoints.get(ws.way); 312 312 } else { 313 is = new ArrayList< Integer>();313 is = new ArrayList<>(); 314 314 insertPoints.put(ws.way, is); 315 315 } … … 317 317 is.add(ws.lowerIndex); 318 318 } 319 Set<Pair<Node,Node>> segSet = new HashSet< Pair<Node,Node>>();320 ArrayList<Way> replacedWays = new ArrayList< Way>();321 ArrayList<Way> reuseWays = new ArrayList< Way>();319 Set<Pair<Node,Node>> segSet = new HashSet<>(); 320 ArrayList<Way> replacedWays = new ArrayList<>(); 321 ArrayList<Way> reuseWays = new ArrayList<>(); 322 322 for (Map.Entry<Way, List<Integer>> insertPoint : insertPoints.entrySet()) { 323 323 Way w = insertPoint.getKey(); … … 326 326 pruneSuccsAndReverse(is); 327 327 for (int i : is) { 328 segSet.add(Pair.sort(new Pair< Node,Node>(w.getNode(i), w.getNode(i+1))));328 segSet.add(Pair.sort(new Pair<>(w.getNode(i), w.getNode(i+1)))); 329 329 } 330 330 for (int i : is) { … … 403 403 //if (is.size() < 2) return; 404 404 405 HashSet<Integer> is2 = new HashSet< Integer>();405 HashSet<Integer> is2 = new HashSet<>(); 406 406 for (int i : is) { 407 407 if (!is2.contains(i - 1) && !is2.contains(i + 1)) { … … 541 541 542 542 private void setNewSelection(OsmPrimitive osm) { 543 Collection<OsmPrimitive> newSelection = new LinkedList< OsmPrimitive>(Main.main.getCurrentDataSet().getSelected());543 Collection<OsmPrimitive> newSelection = new LinkedList<>(Main.main.getCurrentDataSet().getSelected()); 544 544 newSelection.clear(); 545 545 newSelection.add(osm);
Note:
See TracChangeset
for help on using the changeset viewer.
