@Override
	public boolean setComponentName(int rowIndex, String name) throws InvalidNameException {

		String oldName = getComponent(rowIndex).getFieldName();
		if (Objects.equals(oldName, name)) {
			return false;
		}

		if (nameExistsElsewhere(name, rowIndex)) {
			throw new InvalidNameException("Name \"" + name + "\" already exists.");
		}
		return viewDTM.withTransaction("Set Component Name", () -> {
			try {
				getComponent(rowIndex).setFieldName(name); // setFieldName handles trimming
				return true;
			}
			catch (DuplicateNameException exc) {
				throw new InvalidNameException(exc.getMessage());
			}
		});
	}
Cause the component at the specified index to consume undefined bytes
that follow it.
Note: this method adjusts the selection.

@param rowIndex the row index
@return the number of Undefined bytes consumed.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/CompEditorModel.java