@Override
		public void actionPerformed(ListingActionContext context) {
			Address address = context.getAddress();
			Program program = context.getProgram();
			FunctionManager functionManager = program.getFunctionManager();
			Function function = functionManager.getFunctionContaining(address);
			if (function != null) {
				StringBuilder buffer = new StringBuilder();

				try {
					FidHashQuad hash = plugin.service.hashFunction(function);

					if (hash == null) {
						Msg.showError(this, null, "Function too small",
							"Please select a function with at least " +
								plugin.service.getShortHashCodeUnitLength() + " code units");
						return;
					}
					String fullHashSearch = String.format("0x%016x", hash.getFullHash());
					String specificHashSearch = String.format("0x%016x", hash.getSpecificHash());
					FidSearchDebugDialog fidSearchDebugDialog = new FidSearchDebugDialog(service);
					fidSearchDebugDialog.setFullHashText(fullHashSearch);
					fidSearchDebugDialog.setSpecificHashText(specificHashSearch);
					tool.showDialog(fidSearchDebugDialog);
				}
				catch (MemoryAccessException e) {
					buffer.append("MemoryAccessException during hash: " + e.getMessage());
				}
				catch (VersionException e) {
					buffer.append("VersionException during hash: " + e.getMessage());
				}
				catch (IOException e) {
					buffer.append("IOException during hash: " + e.getMessage());
				}
			}
		}
Class that implements hashing the current function in the listing.
Ghidra/Features/FunctionID/src/main/java/ghidra/feature/fid/plugin/FidDebugPlugin.java