private void showResultsMessage(List<DomainFile> allFiles, List<DomainFile> failedFiles) {

			int total = allFiles.size();
			if (failedFiles.isEmpty()) {
				String s = "Checkout completed for " + total + " file(s)";
				tool.setStatusInfo(s);
				Msg.info(this, s);
				return;
			}

			if (failedFiles.size() == 1) {
				DomainFile df = failedFiles.get(0);
				String s = "Exclusive checkout failed for: " + df.getName() +
					"\nOne or more users have file checked out!";
				Msg.showError(this, tool.getToolFrame(), "Checkout Failed", s);
				return;
			}

			String userMessage = "Multiple exclusive checkouts failed." +
				"\nOne or more users have file checked out!";
			StringBuilder buffy = new StringBuilder(userMessage + '\n');
			String message = "Exclusive checkout failed for: %s";
			for (DomainFile df : failedFiles) {
				String formatted = String.format(message, df.getName());
				buffy.append(formatted).append('\n');
			}

			Msg.showError(this, tool.getToolFrame(), "Checkout Failed",
				userMessage + "\n(see log for list of failed files)");
		}
Task for checking out files that are in version control
Ghidra/Framework/Project/src/main/java/ghidra/framework/main/projectdata/actions/VersionControlCheckOutAction.java