@Override
		public void dataTypeRemoved(DataTypeManager dtm, DataTypePath path) {

			if (!isMyCategory(path)) {
				return;
			}

			DataType currentDataType = getCurrentDataType();
			if (currentDataType != null) {
				// the data type is still around--must have been a different data type
				return;
			}

			Msg.showWarn(getClass(), editorPanel, "Enum Data Type Removed",
				path + " was removed from data type manager " + dtm.getName() +
					".\nEdit session will be terminated.");
			dispose();
		}
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