private void handleForwardSelection() {
		// value is a length
		int length = numberInputField.getIntValue(); // throws NFE
		if (length == 0) {
			setStatusText("length must be > 0");
			return;
		}

		clearStatusText();

		Address currentAddress = navigatable.getLocation().getAddress();

		AddressSet addressSet = new AddressSet(navigatable.getSelection());

		if (addressSet.isEmpty()) {
			addressSet.addRange(currentAddress, currentAddress);
		}

		AddressRangeIterator aiter = addressSet.getAddressRanges();
		AddressSet newSet = new AddressSet();
		while (aiter.hasNext()) {
			AddressRange range = aiter.next();
			Address toAddress = createForwardToAddress(range.getMinAddress(), length - 1);
			if (toAddress != null) {
				newSet.addRange(range.getMinAddress(), toAddress);
			}
		}
		ProgramSelection selection = new ProgramSelection(newSet);
		NavigationUtils.setSelection(tool, navigatable, selection);
	}
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