@Override
	public boolean isAddToPopup(ActionContext context) {
		Object contextObject = context.getContextObject();
		if (contextObject instanceof ListingCodeComparisonPanel) {
			Object sourceObject = context.getSourceObject();
			return sourceObject instanceof FieldPanel;
		}
		return false;
	}
Constructor that creates a toggle action for a dual listing.
@param name the name for this action
@param owner the owner of this action
Ghidra/Features/Base/src/main/java/ghidra/features/base/codecompare/listing/ListingDisplayToggleAction.java