private Address createForwardToAddress(Address fromAddress, long length) {

		AddressSpace addressSpace = fromAddress.getAddressSpace();
		if (addressSpace.isOverlaySpace()) {
			OverlayAddressSpace oas = (OverlayAddressSpace) addressSpace;
			AddressRange range = oas.getOverlayAddressSet().getRangeContaining(fromAddress);
			if (range == null) {
				showWarningDialog(OVERFLOW_SELECTION_WARNING);
				return fromAddress;
			}
			long avail = range.getMaxAddress().subtract(fromAddress);
			if (avail < (length - 1)) {
				showWarningDialog(OVERFLOW_SELECTION_WARNING);
				return range.getMaxAddress();
			}
		}

		Address addr = null;
		try {
			addr = fromAddress.addNoWrap(length);
		}
		catch (AddressOverflowException aoobe) {
			showWarningDialog(OVERFLOW_SELECTION_WARNING);
			addr = addressSpace.getMaxAddress();
		}

		return addr;
	}
Class to set up dialog box that will enable the user
to set the available options for block selection
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/select/SelectBlockDialog.java