@Override
	public boolean isDeleteAllowed() {
		if (selection.getNumRanges() != 1) {
			return false;
		}
		FieldRange range = selection.getFieldRange(0);
		if (range.getStart().getIndex().intValue() == 0 ||
			range.getEnd().getIndex().intValue() == getRowCount()) {
			// Can't cross zero boundary.
			int startOffset = getComponent(range.getStart().getIndex().intValue()).getOffset();
			int endOffset = getComponent(range.getEnd().getIndex().intValue() - 1).getEndOffset();
			if (startOffset < 0 && endOffset >= 0) {
				return false;
			}
			int paramOffset = getParameterOffset();
			if (startOffset < paramOffset && endOffset >= paramOffset) {
				return false;
			}
			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