@Override
	protected void checkIsAllowableDataType(DataType dataType) throws InvalidDataTypeException {

		super.checkIsAllowableDataType(dataType);

		// Verify that we aren't adding this structure or anything that it is
		// part of to this editable structure.
		if (dataType.equals(viewComposite)) {
			String msg = "Data type \"" + dataType.getDisplayName() + "\" can't contain itself.";
			throw new InvalidDataTypeException(msg);
		}
		else if (DataTypeUtilities.isSecondPartOfFirst(dataType, viewComposite)) {
			String msg = "Data type \"" + dataType.getDisplayName() + "\" has \"" +
				viewComposite.getDisplayName() + "\" within it.";
			throw new InvalidDataTypeException(msg);
		}
	}
Replaces the components of the original structure with those of the edited one.
Transaction must already be started on the {@link #getOriginalDataTypeManager()
original datatype manager}.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/CompEditorModel.java