private void setExternalProgramAssociation() {
		List<String> selectedExternalNames = getSelectedExternalNames();
		String externalName = selectedExternalNames.get(0);	// must be exactly one for us to be enabled.
		DataTreeDialog dialog = new DataTreeDialog(mainPanel,
			"Choose External Program (" + externalName + ")", OPEN);

		dialog.setSearchText(externalName);

		dialog.addOkActionListener(e1 -> {
			DomainFile domainFile = dialog.getDomainFile();
			if (domainFile == null) {
				return;
			}
			String pathName = domainFile.toString();
			dialog.close();
			ExternalManager externalManager = program.getExternalManager();
			String externalLibraryPath = externalManager.getExternalLibraryPath(externalName);
			if (!pathName.equals(externalLibraryPath)) {
				Command<Program> cmd =
					new SetExternalNameCmd(externalName, domainFile.getPathname());
				getTool().execute(cmd, program);
			}
		});
		dialog.setHelpLocation(new HelpLocation("ReferencesPlugin", "ChooseExternalProgram"));
		getTool().showDialog(dialog);
	}
ComponentProvider that displays a table of External Programs.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/references/ExternalReferencesProvider.java