private boolean addSources() {

		GhidraFileChooser chooser = new GhidraFileChooser(getComponent());
		chooser.setMultiSelectionEnabled(true);
		chooser.setTitle("Choose File to Batch Import");
		chooser.setApproveButtonText("Select files");
		chooser.setFileSelectionMode(GhidraFileChooserMode.FILES_AND_DIRECTORIES);
		chooser.addFileFilter(ImporterUtilities.LOADABLE_FILES_FILTER);
		chooser.addFileFilter(ImporterUtilities.CONTAINER_FILES_FILTER);
		chooser.setSelectedFileFilter(GhidraFileFilter.ALL);

		chooser.setLastDirectoryPreference(LAST_IMPORT_DIR);

		List<File> selectedFiles = chooser.getSelectedFiles();
		if (selectedFiles.isEmpty()) {
			return !chooser.wasCancelled();
		}

		List<FSRL> filesToAdd = new ArrayList<>();
		for (File selectedFile : selectedFiles) {
			filesToAdd.add(FileSystemService.getInstance().getLocalFSRL(selectedFile));
		}

		chooser.dispose();

		return addSources(filesToAdd);
	}
Shows the batch import dialog (via runSwingLater) and prompts the user to select
a file if the supplied {@code batchInfo} is empty.
<p>
The dialog will chain to the {@link ImportBatchTask} when the user clicks the
OK button.

@param tool {@link PluginTool} that will be the parent of the dialog
@param batchInfo optional {@link BatchInfo} instance with already discovered applications, or null.
@param initialFiles optional {@link List} of {@link FSRL files} to add to the batch import dialog, or null.
@param defaultFolder optional default destination folder for imported files or null for root folder.
@param programManager optional {@link ProgramManager} that will be used to open the newly imported
binaries.
Ghidra/Features/Base/src/main/java/ghidra/plugins/importer/batch/BatchImportDialog.java