private void handleToAddressSelection() {
		Address toAddress = null;
		String addressValue = toAddressField.getText();
		clearStatusText();

		// make sure the order of the addresses is correct
		Address currentAddress = navigatable.getLocation().getAddress();
		try {
			toAddress = currentAddress.getAddress(addressValue);
		}
		catch (AddressFormatException e) {
			// use the fact that toAddress remains null
		}
		if (toAddress == null) {
			setStatusText("Invalid address value, enter another address");
			return;
		}
		if (toAddress.compareTo(currentAddress) < 0) {
			Address tmp = toAddress;
			toAddress = currentAddress;
			currentAddress = tmp;
		}
		AddressSet addressSet = new AddressSet(currentAddress, toAddress);
		ProgramSelection selection = new ProgramSelection(addressSet);
		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