@Override
		public void run(TaskMonitor monitor) {

			try {

				List<DomainFile> versionedFiles = new ArrayList<>();
				if (!gatherVersionedFiles(monitor, versionedFiles)) {
					return;
				}

				//
				// This task uses the monitor in a dual mode.  Each sub-task will control the 
				// progress such that each file goes from zero to complete.   This task will
				// control the message so that the user sees the overall progress (e.g., 
				// '1 of 10', etc...)
				// 
				monitor.setMaximum(0);
				monitor.setProgress(0);
				WrappingTaskMonitor wrappedMonitor = new WrappingTaskMonitor(monitor) {
					@Override
					public void setMessage(String message) {
						// do not let sub-tasks update the message, only this task
					}
				};

				List<DomainFile> failedCheckouts = new ArrayList<>();
				int progress = 1;
				for (DomainFile df : versionedFiles) {

					monitor.checkCancelled();
					monitor.setMessage("Checkout " + progress + " of " + versionedFiles.size() +
						": " + df.getName());

					if (!df.checkout(exclusive, wrappedMonitor)) {
						failedCheckouts.add(df);
					}
					++progress;
				}

				showResultsMessage(versionedFiles, failedCheckouts);
			}
			catch (CancelledException e) {
				tool.setStatusInfo("Checkout cancelled");
			}
			catch (IOException e) {
				ClientUtil.handleException(repository, e, "Check Out", tool.getToolFrame());
			}
		}
Task for checking out files that are in version control
Ghidra/Framework/Project/src/main/java/ghidra/framework/main/projectdata/actions/VersionControlCheckOutAction.java