private Symbol getSymbol(ListingActionContext context) {
		Program program = context.getProgram();
		OperandFieldLocation location = (OperandFieldLocation) context.getLocation();

		Address address = location.getAddress();
		int opIndex = location.getOperandIndex();

		ReferenceManager refMgr = program.getReferenceManager();

		Reference ref = refMgr.getPrimaryReferenceFrom(address, opIndex);
		if (ref != null) {
			SymbolTable st = program.getSymbolTable();
			return st.getSymbol(ref);
		}
		return null;
	}
This method gets called when the user clicks on the Cancel Button.  The base
class calls this method.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/label/OperandLabelDialog.java