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

		if (newName.trim().length() == 0) {
			newName = null;
		}

		// prevent user names that are default values, unless the value is the original name
		String nameInEditor = (String) getValueAt(rowIndex, NAME);
		if (viewComposite.isDefaultName(newName) && !isOriginalFieldName(newName, rowIndex)) {
			if (Objects.equals(nameInEditor, newName)) {
				return false; // same as current name in the table; do nothing
			}
			throw new InvalidNameException("Cannot set a stack variable name to a default value");
		}

		if (viewComposite.setName(rowIndex, newName)) {
			updateAndCheckChangeState();
			fireTableCellUpdated(rowIndex, getNameColumn());
			notifyCompositeChanged();
			return true;
		}
		return false;
	}
Returns whether or not addition of the specified component is allowed
at the specified index. the addition could be an insert or replace as
determined by the state of the edit model.

@param currentIndex index of the component in the structure.
@param dataType the data type to be inserted.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/stackeditor/StackEditorModel.java