public boolean updateAndCheckChangeState() {
		if (originalIsChanging) {
			return false;
		}
		Composite oldComposite = getOriginalComposite();
		String oldName = getOriginalDataTypeName();
		String oldDesc = oldComposite != null ? oldComposite.getDescription() : "";
		if (oldDesc == null) {
			oldDesc = "";
		}
		int oldSize = oldComposite != null ? oldComposite.getLength() : 0;

		String newDesc = viewComposite.getDescription();
		if (newDesc == null) {
			newDesc = "";
		}
		int newSize = viewComposite.getLength();

		hasChanges = !currentName.equals(oldName) || !newDesc.equals(oldDesc) || oldSize != newSize;
		if (hasChanges) {
			return true;
		}

		boolean noCompChanges = false;
		if (oldComposite != null && !hasChanges) {
			noCompChanges = (viewComposite.isEquivalent(oldComposite) &&
				hasSameComponentSettings(viewComposite, oldComposite) &&
				!hasCompPathNameChanges(viewComposite, oldComposite));
		}
		else {
			noCompChanges = getNumComponents() == 0;
		}
		hasChanges = !noCompChanges;
		return hasChanges;
	}
Returns whether or not the editor has changes that haven't been applied.
Changes can also mean a new data type that hasn't yet been saved.
@return if there are changes
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/CompositeEditorModel.java