private void replaceArchiveWithFile(ProjectArchive projectArchive,
				DomainFile newDomainFile) {
			DomainFile archiveDomainFile = projectArchive.getDomainFile();
			DomainObject archiveDomainObject = projectArchive.getDomainObject();
			DomainFile objectDomainFile = archiveDomainObject.getDomainFile();
			if (archiveDomainFile == objectDomainFile) {
				return;
			}

			closeArchive(projectArchive);

			String contentType = null;
			try {
				contentType = newDomainFile.getContentType();
				try {
					openArchive(newDomainFile, false, false, TaskMonitor.DUMMY);
				}
				catch (VersionException e) {
					// should never happen following check-in (i.e., DomainObjectReplaced)
					if (VersionExceptionHandler.isUpgradeOK(null, newDomainFile, "Re-open", e)) {
						openArchive(newDomainFile, true, false, TaskMonitor.DUMMY);
					}
				}
			}
			catch (VersionException e) {
				VersionExceptionHandler.showVersionError(null, newDomainFile.getName(), contentType,
					"Re-open", e);
			}
			catch (CancelledException e) {
				throw new AssertException(e);
			}
			catch (Exception e) {
				if (newDomainFile.isInWritableProject() && (e instanceof IOException)) {
					RepositoryAdapter repo =
						newDomainFile.getParent().getProjectData().getRepository();
					ClientUtil.handleException(repo, e, "Re-open File", null);
				}
				else {
					Msg.showError(this, null, "Error Opening " + newDomainFile.getName(),
						"Opening data type archive failed.\n" + e.getMessage());
				}
			}
		}
Signals to this manager to save the knowledge of all currently opened archives and to mark
the tool as dirty (changed) if the current open archives are not the same as those that
were initially opened.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/archive/DataTypeManagerHandler.java