private boolean saveChangedPrograms(List<Program> openProgramList) {
		SaveDataDialog saveDataDialog = new SaveDataDialog(tool);

		// don't modify the original list, as it is used by the caller to perform cleanup
		List<Program> saveProgramsList = new ArrayList<>(openProgramList);

		// make sure we have some files to save
		List<DomainFile> domainFilesToSaveList = new ArrayList<>();
		Iterator<Program> iter = saveProgramsList.iterator();
		while (iter.hasNext()) {
			Program program = iter.next();
			DomainFile domainFile = program.getDomainFile();
			if (!domainFile.isChanged()) {
				iter.remove();
			}
			else {
				domainFilesToSaveList.add(domainFile);
			}
		}

		if (saveProgramsList.size() == 0) {
			return true;
		}
		// calling can close here ensures that we use the same dialog for single files
		else if (saveProgramsList.size() == 1) {
			return canClose(saveProgramsList.get(0));
		}

		return saveDataDialog.showDialog(domainFilesToSaveList);
	}
Prompt user for programs to be saved.
Caller must already have lock on all programs contained within the list.
@return true if it is safe to close tool
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/progmgr/ProgramSaveManager.java