public static void validateDestinationProgramFile(DomainFile file,
			boolean includeFilePathInError, boolean silent) throws IllegalArgumentException {
		String error = null;
		if (!ProgramDB.class.isAssignableFrom(file.getDomainObjectClass())) {
			error = "Destination file does not correspond to a Program";
		}
		else {
			DomainFolder folder = file.getParent();
			if (folder == null || !folder.isInWritableProject()) {
				error = "Destination file must be from active project";
			}
			else if (file.isReadOnly()) {
				error = "Destination file must not be read-only";
			}
			else if (file.isVersioned()) {
				if (!silent) {
					doOptionalDestinationProgramCheckout(file);
				}
				if (!file.isCheckedOut()) {
					error = "Versioned destination file must be checked-out for update";
				}
			}
		}
		if (error != null) {
			if (includeFilePathInError) {
				error += ":\n" + file.getPathname();
			}
			throw new IllegalArgumentException(error);
		}
	}
Validate a VT destination program to ensure it meets minimum criteria to open with a VTSession.
GUI mode only: If file is versioned and not checked-out the user may be prompted to perform
an optional checkout of the file.  Prompting for checkout will not occur if this method
is invoked from the Swing thread or operating in a headless mode.
The following validation checks are performed:
<ul>
<li>file must correspond to a ProgramDB</li>
<li>file must be contained within the active project</li>
<li>file must not be marked read-only</li>
<li>if file is versioned it must be checked-out (user may be prompted to do this)</li>
</ul>
If an error is thrown it is intended to be augmented for proper presentation.

@param file VT Session destination program domain file 
@param includeFilePathInError if true file path will be appended to any exception throw
@param silent if user interaction should not be performed.  This should be true if
filesystem lock is currently held.
@throws IllegalArgumentException if any VT destination program file criteria is not satisfied
Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/util/VTSessionFileUtil.java