src/main/java/de/blau/android/easyedit/turnrestriction/FromElementActionModeCallback.java
/**
     * Continue with the next step in adding the restriction
     * 
     * @param element the original clicked via element
     * @param newFromWay a new from way or null
     * @param newViaWay a new via way or null
     */
Continue with the next step in adding the restriction

@param element the original clicked via element
@param newFromWay a new from way or null
@param newViaWay a new via way or null
Continue with the next step in adding the restriction @param element the original clicked via element @param newFromWay a new from way or null @param newViaWay a new via way or null
private void nextStep(@NonNull OsmElement element, @Nullable Way newFromWay, @Nullable Way newViaWay) {
        Set<OsmElement> newViaElements = new HashSet<>();
        newViaElements.add(element);
        if (newViaWay != null) {
            newViaElements.add(newViaWay);
        }
        if (newFromWay != null) {
            Set<OsmElement> fromElements = new HashSet<>();
            fromElements.add(fromWay);
            fromElements.add(newFromWay);
            Snack.barInfo(main, newViaWay == null ? R.string.toast_split_from : R.string.toast_split_from_and_via);
            main.startSupportActionMode(new RestartFromElementActionModeCallback(manager, fromElements, newViaElements, savedResults));
        } else if (newViaWay != null) {
            Snack.barInfo(main, R.string.toast_split_via);
            main.startSupportActionMode(
                    new FromElementActionModeCallback(manager, R.string.actionmode_restriction_restart_via, fromWay, newViaElements, savedResults));
        } else {
            viaSelected = true;
            main.startSupportActionMode(new ViaElementActionModeCallback(manager, fromWay, element, savedResults));
        }
    }
private void nextStep ( @ NonNull OsmElement element , @ Nullable Way newFromWay , @ Nullable Way newViaWay ) { Set < OsmElement > newViaElements = new HashSet < > ( ) ; newViaElements . add ( element ) ; if ( newViaWay != null ) { newViaElements . add ( newViaWay ) ; } if ( newFromWay != null ) { Set < OsmElement > fromElements = new HashSet < > ( ) ; fromElements . add ( fromWay ) ; fromElements . add ( newFromWay ) ; Snack . barInfo ( main , newViaWay == null ? R . string . toast_split_from : R . string . toast_split_from_and_via ) ; main . startSupportActionMode ( new RestartFromElementActionModeCallback ( manager , fromElements , newViaElements , savedResults ) ) ; } else if ( newViaWay != null ) { Snack . barInfo ( main , R . string . toast_split_via ) ; main . startSupportActionMode ( new FromElementActionModeCallback ( manager , R . string . actionmode_restriction_restart_via , fromWay , newViaElements , savedResults ) ) ; } else { viaSelected = true ; main . startSupportActionMode ( new ViaElementActionModeCallback ( manager , fromWay , element , savedResults ) ) ; } }
Continue with the next step in adding the restriction
Continue with the next step in adding the restriction
// restart via selection