public void setSelectedFile(final File file) {
		if (file == null) {
			// nothing we can do; clear the selection
			worker.schedule(new ClearSelectedFilesJob());
			return;
		}

		File parentDirectory = file.getParentFile();
		if (!file.exists() && !fileExists(parentDirectory)) {
			// no valid file or directory; clear the selection
			worker.schedule(new ClearSelectedFilesJob());
			return;
		}

		// NOTE: we are updating this value here before the code below so that when show() is
		// called, the value will be set, in case any pending jobs that would normally set the
		// value have not finished.
		selectedFiles.setFile(file);

		updateDirAndSelectFile(validateParentDirectory(file), file, true, true);
	}
Sets the selected file. If the file's parent directory is not the current directory,
changes the current directory to be the file's parent directory.
<p>
If the given file is a directory, then it's parent directory will be made the current
directory and the directory represented by the file will be selected within the parent
directory.
<p>
If the given file does not exist, then the following will happen:
<ul>
 <li>If the parent directory of the file exists, then the parent directory will be made
     the current directory and the name of the file will be put into the filename
     textfield; otherwise,</li>
 <li>If the parent file does <b>not</b> exist, then the selection is cleared.</li>
</ul>
<p>
If the given file is null, then the selected file state is cleared.

@see #getSelectedFile
@param file the selected file
Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/GhidraFileChooser.java