@Override
	protected void createArray(int numElements) throws InvalidDataTypeException, UsrException {
		if (getNumSelectedComponentRows() != 1) {
			throw new UsrException("Select an individual component to create an array.");
		}
		super.createArray(numElements);
	}
Clear the selected components

@throws UsrException if clearing isn't allowed
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/UnionEditorModel.java