@Override
	protected boolean isAddToPopup(ListingActionContext context) {
		if (!super.isAddToPopup(context)) {
			return false;
		}

		LocationDescriptor descriptor = getDescriptor(context);
		if (descriptor == null) {
			return false;
		}

		if (!(descriptor instanceof AddressLocationDescriptor)) {
			return true;
		}

		AddressLocationDescriptor addressDescriptor = (AddressLocationDescriptor) descriptor;
		Address homeAddress = addressDescriptor.getHomeAddress();
		Address actionAddress = context.getAddress();
		if (actionAddress.equals(homeAddress)) {
			// A bit of guilty knowledge here: this is handled by another action, the
			// FindReferencesToAddressAction. For that situation, we don't want two actions 
			// appearing in the popup menu.
			return false;
		}

		return true;
	}
{@link LocationReferencesPlugin}'s action for finding references to a thing.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/locationreferences/FindReferencesToAction.java