Changeset 15786 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2020-01-27T03:05:45+01:00 (5 years ago)
Author:
Don-vip
Message:

see #18625 - update signature of layer merge methods, remove deprecated code

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/AbstractMergeAction.java

    r15455 r15786  
    121121
    122122    /**
    123      * Ask user to choose the target layer.
    124      * @param targetLayers list of candidate target layers.
    125      * @return the chosen layer
    126      * @deprecated to be removed
    127      */
    128     @Deprecated
    129     protected static Layer askTargetLayer(List<Layer> targetLayers) {
    130         return askTargetLayer(targetLayers, false, null, false, tr("Merge")).selectedTargetLayer;
    131     }
    132 
    133     /**
    134      * Ask user to choose the target layer and shows a checkbox.
    135      * @param targetLayers list of candidate target layers.
    136      * @param checkbox The text of the checkbox shown to the user.
    137      * @param checkboxDefault whether the checkbox is ticked by default
    138      * @return The {@link TargetLayerDialogResult} containing the chosen target layer and the state of the checkbox
    139      * @deprecated to be removed
    140      */
    141     @Deprecated
    142     protected static TargetLayerDialogResult<Layer> askTargetLayer(List<Layer> targetLayers, String checkbox, boolean checkboxDefault) {
    143         return askTargetLayer(targetLayers, true, checkbox, checkboxDefault, tr("Merge"));
    144     }
    145 
    146     /**
    147123     * Ask user to choose the target layer and shows a checkbox.
    148124     * @param targetLayers list of candidate target layers.
     
    154130     * @since 15450
    155131     */
    156     protected static TargetLayerDialogResult<Layer> askTargetLayer(List<Layer> targetLayers, boolean showCheckbox,
     132    protected static TargetLayerDialogResult<Layer> askTargetLayer(List<? extends Layer> targetLayers, boolean showCheckbox,
    157133            String checkbox, boolean checkboxDefault, String buttonText) {
    158134        return askTargetLayer(targetLayers.toArray(new Layer[0]),
  • trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java

    r15755 r15786  
    5252     * @since 11885 (return type)
    5353     */
    54     protected Future<?> doMerge(List<Layer> targetLayers, final Collection<Layer> sourceLayers) {
     54    protected Future<?> doMerge(List<? extends Layer> targetLayers, final Collection<? extends Layer> sourceLayers) {
    5555        final boolean onlygpx = targetLayers.stream().noneMatch(l -> !(l instanceof GpxLayer));
    5656        final TargetLayerDialogResult<Layer> res = askTargetLayer(targetLayers, onlygpx,
     
    125125     * @since 11885 (return type)
    126126     */
    127     public Future<?> merge(List<Layer> sourceLayers) {
     127    public Future<?> merge(List<? extends Layer> sourceLayers) {
    128128        return doMerge(sourceLayers, sourceLayers);
    129129    }
Note: See TracChangeset for help on using the changeset viewer.