Ignore:
Timestamp:
2016-09-08T21:26:39+02:00 (8 years ago)
Author:
donvip
Message:

fix deprecation/checkstyle warning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/Address.java

    r32556 r32950  
    9494        super(tr("Add address"), "buildings",
    9595                tr("Helping tool for tag address"),
     96                // CHECKSTYLE.OFF: LineLength
    9697                Shortcut.registerShortcut("mapmode:cadastre-fr-buildings", tr("Mode: {0}", tr("CadastreFR - Buildings")), KeyEvent.VK_E, Shortcut.DIRECT),
     98                // CHECKSTYLE.ON: LineLength
    9799                mapFrame, getCursor());
    98100    }
     
    130132        List<Way> mouseOnExistingWays = new ArrayList<>();
    131133        List<Way> mouseOnExistingBuildingWays = new ArrayList<>();
    132         Node currentMouseNode = mv.getNearestNode(mousePos, OsmPrimitive.isSelectablePredicate);
     134        Node currentMouseNode = mv.getNearestNode(mousePos, OsmPrimitive::isSelectable);
    133135        if (currentMouseNode != null) {
    134136            // click on existing node
     
    184186            }
    185187        } else {
    186             List<WaySegment> wss = mv.getNearestWaySegments(mousePos, OsmPrimitive.isSelectablePredicate);
     188            List<WaySegment> wss = mv.getNearestWaySegments(mousePos, OsmPrimitive::isSelectable);
    187189            for (WaySegment ws : wss) {
    188190                if (ws.way.get(tagHighway) != null && ws.way.get(tagHighwayName) != null)
     
    298300        Node n = new Node(Main.map.mapView.getLatLon(e.getX(), e.getY()));
    299301        cmds.add(new AddCommand(n));
    300         List<WaySegment> wss = Main.map.mapView.getNearestWaySegments(e.getPoint(), OsmPrimitive.isSelectablePredicate);
     302        List<WaySegment> wss = Main.map.mapView.getNearestWaySegments(e.getPoint(), OsmPrimitive::isSelectable);
    301303        Map<Way, List<Integer>> insertPoints = new HashMap<>();
    302304        for (WaySegment ws : wss) {
Note: See TracChangeset for help on using the changeset viewer.