@Override
	protected void dispose() {
		if (secondaryDiffProgram != null) {
			closeProgram2();
		}
		if (diffListingPanel != null) {
			diffListingPanel.removeButtonPressedListener(diffFieldNavigator);
			diffFieldNavigator = null;
			diffNavigatable = null;
			diffListingPanel = null;
		}
		if (diffApplySettingsProvider != null) {
			diffApplySettingsProvider.removeActionListener(applySettingsListener);
		}
		if (diffDetailsProvider != null) {
			diffDetailsProvider.removeActionListener(diffDetailsListener);
		}

		if (executeDiffDialog != null) {
			executeDiffDialog.dispose();
		}

		actionManager.dispose();
		applySettingsMgr.dispose();
		markerManager.dispose();
		codeViewerService.setCoordinatedListingPanelListener(null);
	}
Used for testing to force file selection dialog instance.
@param dialog project file selection dialog
Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/ProgramDiffPlugin.java