@Override
	protected void programActivated(Program program) {
		registerMgrProvider.setProgram(program);
		ArrayList<Register> list = new ArrayList<>();
		for (Register reg : program.getProgramContext().getRegisters()) {
			if (!reg.isHidden()) {
				list.add(reg);
			}
		}
		Collections.sort(list);
		registers = new Register[list.size()];
		registers = list.toArray(registers);
	}
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