public void mergeConflicts(ListingMergePanel listingPanel, int chosenConflictOption,
			TaskMonitor monitor) throws CancelledException, MemoryAccessException {

		monitor.setMessage("Resolving Code Unit conflicts.");
		boolean askUser = (chosenConflictOption == ASK_USER);
		int totalConflicts = ranges.length;
		monitor.initialize(totalConflicts);
		for (int conflictIndex = 0; conflictIndex < totalConflicts; conflictIndex++) {
			AddressRange range = ranges[conflictIndex];
			Address rangeMin = range.getMinAddress();
			Address rangeMax = range.getMaxAddress();
			// If we have a byte/codeUnit/equate choice then a "Use For All" has already occurred.
			if (conflictChoice != ASK_USER) {
				merge(rangeMin, rangeMax, chosenConflictOption, monitor);
			}
			else {
				if (askUser && mergeManager != null) {
					conflictInfoPanel.setCodeUnitInfo(range, conflictIndex + 1, totalConflicts);
					conflictInfoPanel.setConflictInfo(1, 1);
					showMergePanel(listingPanel, rangeMin, rangeMax, monitor);
					monitor.checkCancelled();
					chosenConflictOption = getSelectedOption(conflictPanel);
					monitor.setMaximum(totalConflicts);
					monitor.setProgress(conflictIndex + 1);
				}
				else {
					merge(rangeMin, rangeMax, chosenConflictOption, monitor);
				}
			}
		}
	}
Merges all the current conflicts according to the conflictOption.
@param listingPanel the listing merge panel
@param chosenConflictOption the conflict option to use when merging (should be ASK_USER for interactive).
@param monitor the status monitor
@throws CancelledException if the user cancels
@throws MemoryAccessException if bytes can't be merged.
Ghidra/Features/Base/src/main/java/ghidra/app/merge/listing/CodeUnitMerger.java