boolean askToAnalyze(PluginTool tool) {
		// This code relies on being called in the swing thread to avoid a race condition
		// where multiple threads check the flag before either thread has a chance to set it.
		Swing.assertSwingThread("Asking to analyze must be on the swing thread!");

		// We only ever want to ask once per session even if they said it is ok to ask again
		if (alreadyAskedThisSession) {
			return false;
		}
		alreadyAskedThisSession = true;

		if (GhidraProgramUtilities.shouldAskToAnalyze(program)) {
			String name = HTMLUtilities.escapeHTML(program.getDomainFile().getName());
			HelpLocation help = new HelpLocation("AutoAnalysisPlugin", "Ask_To_Analyze");
			int result = OptionDialog.showOptionNoCancelDialog(tool.getToolFrame(), "Analyze?",
				"<html>" + name + " has not been analyzed. Would you like to analyze it now?",
				"Yes", "No", "No (Don't ask again)", OptionDialog.QUESTION_MESSAGE, help);

			if (result == OptionDialog.OPTION_THREE) {
				GhidraProgramUtilities.markProgramNotToAskToAnalyze(program);
			}
			return result == OptionDialog.OPTION_ONE; //Analyze
		}
		return false;
	}
Returns the tool being used for analysis.  <b>This can be null</b> if analysis has never
been run or if the tool that previously ran analysis has been closed.
@return the tool being used for analysis.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AutoAnalysisManager.java