Subject: [PATCH] #23555: Patch for plugins
---
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java b/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
|
a
|
b
|
|
| 486 | 486 | final TagCollection tagsOfPrimitives, |
| 487 | 487 | final Collection<? extends OsmPrimitive> primitives, |
| 488 | 488 | final Collection<? extends OsmPrimitive> targetPrimitives) throws UserCancelException { |
| | 489 | return launchIfNecessary(tagsOfPrimitives, primitives, targetPrimitives, false); |
| | 490 | } |
| 489 | 491 | |
| | 492 | /** |
| | 493 | * Replies the list of {@link Command commands} needed to resolve specified conflicts, |
| | 494 | * by displaying if necessary a {@link CombinePrimitiveResolverDialog} to the user. |
| | 495 | * This dialog will allow the user to choose conflict resolution actions. |
| | 496 | * <p> |
| | 497 | * Non-expert users are informed first of the meaning of these operations, allowing them to cancel. |
| | 498 | * |
| | 499 | * @param tagsOfPrimitives The tag collection of the primitives to be combined. |
| | 500 | * Should generally be equal to {@code TagCollection.unionOfAllPrimitives(primitives)} |
| | 501 | * @param primitives The primitives to be combined |
| | 502 | * @param targetPrimitives The primitives the collection of primitives are merged or combined to. |
| | 503 | * @param onlyConflictingTags {@code true} if we want to show the dialog <i>only if</i> there are tags that conflict |
| | 504 | * @return The list of {@link Command commands} needed to apply resolution actions. |
| | 505 | * @throws UserCancelException If the user cancelled a dialog. |
| | 506 | * @since xxx |
| | 507 | */ |
| | 508 | public static List<Command> launchIfNecessary( |
| | 509 | final TagCollection tagsOfPrimitives, |
| | 510 | final Collection<? extends OsmPrimitive> primitives, |
| | 511 | final Collection<? extends OsmPrimitive> targetPrimitives, |
| | 512 | boolean onlyConflictingTags) throws UserCancelException { |
| 490 | 513 | CheckParameterUtil.ensureParameterNotNull(tagsOfPrimitives, "tagsOfPrimitives"); |
| 491 | 514 | CheckParameterUtil.ensureParameterNotNull(primitives, "primitives"); |
| 492 | 515 | CheckParameterUtil.ensureParameterNotNull(targetPrimitives, "targetPrimitives"); |
| … |
… |
|
| 518 | 541 | |
| 519 | 542 | tagModel.populate(tagsToEdit, completeWayTags.getKeysWithMultipleValues(), false); |
| 520 | 543 | relModel.populate(parentRelations, primitives, false); |
| 521 | | if (Config.getPref().getBoolean("combine-conflict-precise", true)) { |
| | 544 | if (onlyConflictingTags || Config.getPref().getBoolean("combine-conflict-precise", true)) { |
| 522 | 545 | tagModel.prepareDefaultTagDecisions(getResolvableKeys(tagsOfPrimitives.getKeys(), primitives)); |
| 523 | 546 | } else { |
| 524 | 547 | tagModel.prepareDefaultTagDecisions(false); |