@Override
	public List<File> getMatchingData(String searchText) {
		if (searchText == null || searchText.length() == 0) {
			return Collections.emptyList();
		}

		File directory = chooser.getCurrentDirectory();
		File[] files = directory.listFiles();
		if (files == null) {
			return Collections.emptyList();
		}
		List<File> list = new ArrayList<>();
		for (File file : files) {
			list.add(file);
		}

		Collections.sort(list, sortComparator);

		return getMatchingSubList(searchText, searchText + END_CHAR, list);
	}
A model that allows the {@link DropDownSelectionTextField} to work with File objects.
Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/FileDropDownSelectionDataModel.java