private Reference getOperandReference(ListingActionContext context) {
		if (!(context.getLocation() instanceof OperandFieldLocation)) {
			return null;
		}

		OperandFieldLocation opLoc = (OperandFieldLocation) context.getLocation();
		Address address = opLoc.getAddress();
		int opIndex = opLoc.getOperandIndex();
		Data dataComp = getDataComponent(context);
		if (dataComp != null) {
			if (isInUnion(dataComp)) {
				return null;
			}
			address = dataComp.getMinAddress();
		}

		ReferenceManager refMgr = context.getProgram().getReferenceManager();
		return refMgr.getPrimaryReferenceFrom(address, opIndex);
	}
Return true if the given context has label history.

@param context the action context
@return true if the given context has label history
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/label/LabelMgrPlugin.java