src/main/java/de/blau/android/easyedit/turnrestriction/FromElementWithViaNodeActionModeCallback.java
/**
     * In the simplest case this selects the next step in creating the restriction, in the worst it splits both the via
     * and from way and restarts the process.
     */
In the simplest case this selects the next step in creating the restriction, in the worst it splits both the via
and from way and restarts the process.
In the simplest case this selects the next step in creating the restriction in the worst it splits both the via and from way and restarts the process .
@Override
    public boolean handleElementClick(OsmElement element) { 
        super.handleElementClick(element);
        if (!Way.NAME.equals(element.getName())) {
            Log.e(DEBUG_TAG, element.getName() + " clicked");
            return true;
        }
        final Way fromWay = (Way) element;
        if (!fromWay.isEndNode(viaNode)) {
            splitSafe(Util.wrapInList(fromWay), () -> {
                try {
                    List<Result> result = logic.performSplit(main, fromWay, viaNode);
                    Way newFromWay = newWayFromSplitResult(result);
                    saveSplitResult(fromWay, result);
                    nextStep(fromWay, newFromWay);
                } catch (OsmIllegalOperationException | StorageException ex) {
                    manager.finish();
                }
            });
        } else {
            nextStep(fromWay, null);
        }
        return true;
    }
@ Override public boolean handleElementClick ( OsmElement element ) { super . handleElementClick ( element ) ; if ( ! Way . NAME . equals ( element . getName ( ) ) ) { Log . e ( DEBUG_TAG , element . getName ( ) + " clicked" ) ; return true ; } final Way fromWay = ( Way ) element ; if ( ! fromWay . isEndNode ( viaNode ) ) { splitSafe ( Util . wrapInList ( fromWay ) , ( ) -> { try { List < Result > result = logic . performSplit ( main , fromWay , viaNode ) ; Way newFromWay = newWayFromSplitResult ( result ) ; saveSplitResult ( fromWay , result ) ; nextStep ( fromWay , newFromWay ) ; } catch ( OsmIllegalOperationException | StorageException ex ) { manager . finish ( ) ; } } ) ; } else { nextStep ( fromWay , null ) ; } return true ; }
In the simplest case this selects the next step in creating the restriction, in the worst it splits both the via
 and from way and restarts the process.
In the simplest case this selects the next step in creating the restriction in the worst it splits both the via and from way and restarts the process .
// NOSONAR // due to clickableElements, only valid nodes can be clicked // check if we have to split from or via // FIXME show a warning // split from at node // toast has already been displayed