@Override
	public DataTypeComponent insert(int rowIndex, DataType datatype, int length)
			throws InvalidDataTypeException, UsrException {

		if (isEditingField()) {
			endFieldEditing();
		}
		checkIsAllowableDataType(datatype);
		if (length < 1) {
			DataTypeInstance dti = DataTypeHelper.getSizedDataType(getProvider(), datatype,
				lastNumBytes, Integer.MAX_VALUE);
			if (dti == null) {
				return null;
			}
			datatype = dti.getDataType();
			length = dti.getLength();
		}
		DataTypeComponent dtc = insert(rowIndex, datatype, length, null, null);
		fixSelection();
		selectionChanged();
		return dtc;
	}
Insert the named data type before the specified index.
 Returns null, if the inserted component is an Undefined byte
 and it gets consumed by the component before it.

@param rowIndex index of the row (component).

@throws InvalidDataTypeException if the structure being edited is part
        of the data type being inserted or if inserting isn't allowed.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/CompEditorModel.java