/**
   * Replies the list of {@link Command commands} needed to apply resolution choices.
   *
   * @return The list of {@link Command commands} needed to apply resolution choices.
   */
  public List<Command> buildResolutionCommands() {
    List<Command> cmds = new LinkedList<>();

    TagCollection allResolutions = getTagConflictResolverModel().getAllResolutions();
    if (!allResolutions.isEmpty()) {
      cmds.addAll(buildTagChangeCommand(targetPrimitive, allResolutions));
    }
    for (String p : OsmPrimitive.getDiscardableKeys()) {
      if (targetPrimitive.get(p) != null) {
        cmds.add(new ChangePropertyCommand(targetPrimitive, p, null));
      }
    }

    if (getRelationMemberConflictResolverModel().getNumDecisions() > 0) {
      cmds.addAll(
          getRelationMemberConflictResolverModel().buildResolutionCommands(targetPrimitive));
    }

    Command cmd =
        pnlRelationMemberConflictResolver.buildTagApplyCommands(
            getRelationMemberConflictResolverModel().getModifiedRelations(targetPrimitive));
    if (cmd != null) {
      cmds.add(cmd);
    }
    return cmds;
  }