@Override
		public void restored(DataTypeManager dtm) {
			if (originalEnumID <= 0) {
				return;
			}

			DataTypeManager originalDTM = originalEnum.getDataTypeManager();
			DataType dt = originalDTM.getDataType(originalEnumID);

			boolean exists = false;
			if (dt instanceof Enum) {
				originalEnum = (Enum) dt;
				exists = true;
			}
			else {
				// original enum no longer exists
				originalEnumID = -1;
				EnumDataType enuum = editorPanel.getEnum();
				originalEnum = new EnumDataType(enuum.getCategoryPath(), enuum.getName(),
					enuum.getLength(), originalDTM);
			}

			originalEnumName = originalEnum.getDisplayName();
			updateTitle(originalEnum);
			originalCategoryPath = originalEnum.getCategoryPath();

			editorPanel.domainObjectRestored((EnumDataType) originalEnum.copy(originalDTM), exists);
			tool.setStatusInfo("");
		}
Prompts the user if the editor has unsaved changes. Saves the changes if
the user indicates to do so.
@return CANCEL (0) if the user canceled;
  SAVE (1) if the user saved changes;
  NO_SAVE (2) if the user did not save changes or no save was required;
  ERROR (3) if there was an error when the changes were applied.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/editor/EnumEditorProvider.java