private GhidraFileChooser createFileChooser(String extension, String desc,
			String filePathName) {
		String exampleExtension = extension;
		long lastIndex = extension.lastIndexOf(".");
		if (lastIndex >= 0) {
			exampleExtension = extension.substring((int) (lastIndex + 1));
		}

		GhidraFileChooser fileChooser = new GhidraFileChooser(null);
		// start the browsing in the user's preferred project directory
		File file = null;
		if (filePathName != null && filePathName.length() > 0) {
			file = new File(filePathName);
			if (file.isDirectory()) {
				fileChooser.setCurrentDirectory(file);
			}
			else {
				fileChooser.setSelectedFile(file);
			}
		}
		if (file == null) {
			file = new File(GenericRunInfo.getProjectsDirPath());
			fileChooser.setCurrentDirectory(file);
		}

		fileChooser.setFileSelectionMode(GhidraFileChooser.FILES_ONLY);
		fileChooser.setFileFilter(new ExtensionFileFilter(exampleExtension, desc));

		return fileChooser;
	}
Creates a file chooser for selecting files with the specified extension.
@param extension the file extension for valid files to choose.
@param desc the description for the extension
@param fileURL the URL indicating the default directory/file to select.
@return the file chooser.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/RestoreDialog.java