public DomainFile save(Project project, MessageLog messageLog, TaskMonitor monitor)
			throws CancelledException, ClosedException, IOException {

		if (ignoreSave) {
			return domainFile;
		}

		if (domainObject.isClosed()) {
			throw new ClosedException(
				"Cannot saved closed DomainObject: " + domainObject.getName());
		}

		try {
			if (getSavedDomainFile() != null) { // 
				throw new IOException("Already saved to " + domainFile);
			}
		}
		catch (FileNotFoundException e) {
			// DomainFile was already saved, but no longer exists.
			// Allow the save to proceed.
			domainFile = null;
		}

		int uniqueNameIndex = 0;
		String uniqueName = name;
		try {
			DomainFolder programFolder = ProjectDataUtils.createDomainFolderPath(
				project.getProjectData().getRootFolder(), projectFolderPath);
			while (!monitor.isCancelled()) {
				try {
					domainFile = programFolder.createFile(uniqueName, domainObject, monitor);
					return domainFile;
				}
				catch (DuplicateFileException e) {
					uniqueName = name + "." + uniqueNameIndex;
					++uniqueNameIndex;
				}
			}
		}
		catch (InvalidNameException e) {
			throw new IOException(e);
		}
		throw new CancelledException();
	}
Saves the loaded {@link DomainObject} to the given {@link Project} at this object's 
project folder path, using this object's name.
<p>
If a {@link DomainFile} already exists with the same desired name and project folder path,
the desired name will get a counter value appended to it to avoid a naming conflict.
Therefore, it should not be assumed that the returned {@link DomainFile} will have the same
name as a call to {@link #getName()}.

@param project The {@link Project} to save to
@param messageLog The log
@param monitor A cancelable task monitor
@return The {@link DomainFile} where the save happened
@throws CancelledException if the operation was cancelled
@throws ClosedException if the loaded {@link DomainObject} was already closed
@throws IOException If there was an IO-related error, an invalid name was specified, or it
  was already successfully saved and still exists
Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/Loaded.java