private void enableOption(String optionName, boolean expectWarning) {

		if (expectWarning) {
			OptionDialog warningDialog = waitForDialogComponent(OptionDialog.class);
			pressButtonByText(warningDialog, "Continue");
		}

		AnalysisOptionsDialog optionsDialog = waitForDialogComponent(AnalysisOptionsDialog.class);

		// select some options
		JComponent root = optionsDialog.getComponent();
		pressButtonByText(root, "Deselect All");

		// just enable a specific option, so we can verify that all programs share that option
		selectAnalyzer(optionsDialog, optionName);

		// press Apply
		pressButtonByText(optionsDialog, "Analyze");
	}
Returns true if the given analyzer is enabled.

@param name the name of the analyzer
@param program the program to check
@return true if the analyzer is enabled; false otherwise
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/analysis/AnalyzeAllOpenProgramsTaskTest.java