public File getSelectedFile(boolean show) {
		if (show) {
			return getSelectedFile();
		}

		if (isShowing()) {
			// NOTE: this is an unvalidated file, as this method has been called while
			//       the file chooser is still showing, before any validation has taken place
			return selectedFiles.getFile();
		}

		return validatedFiles.getFile();
	}
Returns the selected file. This can be set either by the programmer
via {@link #setSelectedFile(File)} or by a user action, such as either typing the filename
into the UI or selecting the file from a list in the UI.
<p>
Note: this method can be called after the chooser has been shown, in which case the
value returned has been validated by the chooser.  Also, the method may be called
while the chooser is showing (like from a test thread).  In this case, the selected file
will not have been validated by the chooser.

@param show if true then the dialog is displayed
@return the selected file; null if cancelled or no file was selected
Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/GhidraFileChooser.java