private Program openProgram(DomainFile domainFile, boolean isSource) {

		String type = isSource ? "VT Source Program" : "VT Destination Program";

		if (SystemUtilities.isInHeadlessMode()) {
			try {
				return (Program) domainFile.getDomainObject(this, false, false, TaskMonitor.DUMMY);
			}
			catch (CancelledException e) {
				throw new AssertionError(e); // unexpected
			}
			catch (VersionException e) {
				VersionExceptionHandler.showVersionError(null, domainFile.getName(), type, "open",
					e);
			}
			catch (IOException e) {
				Msg.showError(this, null, "Can't open " + type + ": " + domainFile.getName(),
					e.getMessage());
			}
			return null;
		}

		// Headed GUI Mode

		OpenProgramTask openTask = new OpenProgramTask(domainFile, this);
		openTask.setOpenPromptText("Open " + type);

		TaskLauncher.launch(openTask);

		OpenProgramRequest openProgram = openTask.getOpenProgram();
		return openProgram != null ? openProgram.getProgram() : null;
	}
Open associated source and destination program files and complete session initialization.
@param projectData active project data
@throws IOException if source or destination program not found within specified project
or an error occured while opening them (e.g., upgrade required).
Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/db/VTSessionDB.java