private void showMergePanel(final ListingMergePanel listingPanel, final Address minAddress,
			final Address maxAddress, TaskMonitor monitor) {
		this.min = minAddress;
		this.currentAddress = minAddress;
		this.max = maxAddress;
		this.currentMonitor = monitor;
		try {
			final ChangeListener changeListener = new ChangeListener() {
				@Override
				public void stateChanged(ChangeEvent e) {
					ResolveConflictChangeEvent re = (ResolveConflictChangeEvent) e;
					int choice = re.getChoice();
					switch (choice) {
						case 1:
							conflictOption = KEEP_LATEST;
							break;
						case 2:
							conflictOption = KEEP_MY;
							break;
						case 4:
							conflictOption = KEEP_ORIGINAL;
							break;
						default:
							conflictOption = ASK_USER;
							break;
					}
					if (conflictOption == ASK_USER || conflictOption == CANCELED) {
						if (mergeManager != null) {
							mergeManager.setApplyEnabled(false);
						}
						return;
					}
					if (mergeManager != null) {

						mergeManager.clearStatusText();
					}
					try {
						merge(CodeUnitMerger.this.min, CodeUnitMerger.this.max, conflictOption,
							currentMonitor);
					}
					catch (CancelledException ce) {
						// User cancelled.
					}
					catch (MemoryAccessException e1) {
						Msg.error(this, "Unexpected Exception: " + e1.getMessage(), e1);
					}
					if (mergeManager != null) {
						mergeManager.setApplyEnabled(true);
					}
				}
			};
			SwingUtilities.invokeAndWait(new Runnable() {
				@Override
				public void run() {
					if (conflictPanel != null) {
						conflictPanel.clear();
					}
					else {
						conflictPanel = new VariousChoicesPanel();
						currentConflictPanel = conflictPanel;
						conflictPanel.setTitle("Code Unit");
					}
					String text = getConflictString(minAddress, maxAddress);
					conflictPanel.setHeader(text);

					String latest = "'" + LATEST_TITLE + "' version";
					String my = "'" + MY_TITLE + "' version";
					String original = "'" + ORIGINAL_TITLE + "' version";
					conflictPanel.addSingleChoice("Use Code Unit From: ",
						new String[] { latest, my, original }, changeListener);

					boolean useForAll = (conflictChoice != ASK_USER);
					conflictPanel.setUseForAll(useForAll);
					conflictPanel.setConflictType("Byte / Code Unit");

					listingPanel.setBottomComponent(conflictPanel);
				}
			});
			SwingUtilities.invokeLater(new Runnable() {
				@Override
				public void run() {
					listingPanel.clearAllBackgrounds();
					listingPanel.paintAllBackgrounds(
						resultAddressFactory.getAddressSet(minAddress, maxAddress));
				}
			});
		}
		catch (InterruptedException e) {
		}
		catch (InvocationTargetException e) {
		}
		if (mergeManager != null) {
			mergeManager.setApplyEnabled(false);
			mergeManager.showListingMergePanel(currentAddress);
		}
		// block until the user either cancels or hits the "Apply" button
		// on the merge dialog...
		// when the "Apply" button is hit, get the user's selection
		// and continue.
	}
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