@Override
		public boolean fieldElementClicked(Object clickedObject, Navigatable sourceNavigatable,
				ProgramLocation location, MouseEvent mouseEvent, ServiceProvider serviceProvider) {
			if (mouseEvent.getClickCount() != 2) {
				return false;
			}
			Register reg = null;
			if (location instanceof RegisterTransitionFieldLocation) {
				RegisterTransitionFieldLocation loc = (RegisterTransitionFieldLocation) location;
				reg = loc.getRegister();
			}
			else if (location instanceof RegisterFieldLocation) {
				RegisterFieldLocation loc = (RegisterFieldLocation) location;
				reg = loc.getRegister();
			}
			ProgramManager programManager = serviceProvider.getService(ProgramManager.class);
			if (programManager == null) {
				return false;
			}
			Program activeProgram = programManager.getCurrentProgram();

			if (reg != null && activeProgram == sourceNavigatable.getProgram()) {
				tool.showComponentProvider(registerMgrProvider, true);
				registerMgrProvider.setLocation(reg, location.getAddress());
			}
			return true;
		}
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