boolean checkEditor(EditorProvider editor, boolean allowCancel) {
		if (editor != null) {
			if (editor.needsSave()) {
				editor.show();
				if (!editor.checkForSave(allowCancel)) {
					return false;
				}
			}
		}
		return true;
	}
Determines if the indicated editor has unsaved changes.
Prompts the user to save the changes.
@param editor the editor to check.
@param allowCancel true indicates that the user can cancel the editor close when prompted
for whether to save changes or not.
@return true when done checking or false if the user cancels.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/editor/DataTypeEditorManager.java