void setRegisterValues(ProgramLocationActionContext context, Register register,
			AddressSetView addrSet, boolean selectRegister) {

		SetRegisterValueDialog dialog =
			new SetRegisterValueDialog(context.getProgram(), registers, register, addrSet, true);

		tool.showDialog(dialog);

		BigInteger value = dialog.getRegisterValue();
		Register selectedRegister = dialog.getSelectRegister();
		if (value != null && selectedRegister != null) {
			applyRegisterValues(context.getProgram(), selectedRegister, value, addrSet);
			if (selectRegister) {
				registerMgrProvider.selectRegister(selectedRegister);
			}
		}
	}
Shows the registers available in a program along with any values that are set.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/register/RegisterPlugin.java