unreversedTagWays.removeAll(reversedWays);
ReverseWayTagCorrector reverseWayTagCorrector = new ReverseWayTagCorrector();
List<Way> reversedTagWays = new ArrayList<>(reversedWays.size());
Collection<Command> changePropertyCommands = null;
for (Way w : reversedWays) {
Way wnew = new Way(w);
reversedTagWays.add(wnew);
changePropertyCommands = reverseWayTagCorrector.execute(w, wnew);
}
if ((changePropertyCommands != null) && !changePropertyCommands.isEmpty()) {
for (Command c : changePropertyCommands) {
c.executeCommand();
}
}
wayTags = TagCollection.unionOfAllPrimitives(reversedTagWays);
wayTags.add(TagCollection.unionOfAllPrimitives(unreversedTagWays));
}
}
// create the new way and apply the new node list
//
Way targetWay = getTargetWay(ways);
Way modifiedTargetWay = new Way(targetWay);
modifiedTargetWay.setNodes(path);
List<Command> resolution = CombinePrimitiveResolverDialog.launchIfNecessary(wayTags, ways, Collections.singleton(targetWay));
LinkedList<Command> cmds = new LinkedList<>();
LinkedList<Way> deletedWays = new LinkedList<>(ways);