@Override
	protected void locationChanged(ProgramLocation loc) {
		if (loc instanceof RegisterTransitionFieldLocation) {
			RegisterTransitionFieldLocation regLoc = (RegisterTransitionFieldLocation) loc;
			Register reg = regLoc.getRegister();
			if (reg != null) {
				registerMgrProvider.setLocation(reg, regLoc.getAddress());
			}
		}
		else if (loc instanceof RegisterFieldLocation) {
			RegisterFieldLocation regLoc = (RegisterFieldLocation) loc;
			Register reg = regLoc.getRegister();
			if (reg != null) {
				registerMgrProvider.setLocation(reg, regLoc.getAddress());
			}
		}
		if (loc instanceof CodeUnitLocation) {
			registerMgrProvider.setLocation(null, loc.getAddress());
		}
	}
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