@Override
	public ActionContext getActionContext(MouseEvent event) {

		Object source = (event != null) ? event.getSource() : null;
		Component sourceComponent = (source instanceof Component) ? (Component) source : null;
		Function sourceFunction = getSelectedSourceFunction();
		Function destinationFunction = getSelectedDestinationFunction();

		// If action is on the function associations table, return a function association context 
		// for the popup actions.
		if (dualTablePanel.isAncestorOf(sourceComponent)) {
			return new VTFunctionAssociationContext(tool, sourceFunction, destinationFunction,
				getExistingMatch(sourceFunction, destinationFunction));
		}

		boolean isToolbarButtonAction = (event == null); // Toolbar buttons pass a null event to this method.
		// Tool bar or function compare panel.
		if (isToolbarButtonAction || functionComparisonPanel.isAncestorOf(sourceComponent)) {

			ListingCodeComparisonPanel dualListingPanel =
				functionComparisonPanel.getDualListingPanel();
			boolean isShowingDualListing =
				(dualListingPanel != null) && dualListingPanel.isVisible();
			boolean sourceIsADualFieldPanel =
				isShowingDualListing && dualListingPanel.isAncestorOf(sourceComponent) &&
					(sourceComponent instanceof FieldPanel);

			ListingPanel listingPanel = null; // Default is don't create a function association listing context.
			// Is the action being taken on the dual listing?
			if (sourceIsADualFieldPanel) {
				listingPanel = dualListingPanel.getListingPanel((FieldPanel) sourceComponent);
			}
			// Is the action being taken on a toolbar button while the dual listing is visible?
			else if (isToolbarButtonAction && isShowingDualListing) {
				listingPanel = dualListingPanel.getActiveListingPanel();
			}
			// If the dual listing is showing and this is a toolbar action or the action is 
			// on one of the listings in the ListingCodeComparisonPanel
			// then return a special function association listing context. This will allow
			// popup actions for the ListingDiff and also the function association actions 
			// for the functions selected in the tables.
			if (listingPanel != null) {
				VTListingNavigator vtListingNavigator =
					new VTListingNavigator(dualListingPanel, listingPanel);
				VTFunctionAssociationCompareContext vtListingContext =
					new VTFunctionAssociationCompareContext(this, vtListingNavigator, tool,
						sourceFunction, destinationFunction,
						getExistingMatch(sourceFunction, destinationFunction));
				vtListingContext.setCodeComparisonPanel(dualListingPanel);
				vtListingContext.setContextObject(dualListingPanel);
				vtListingContext.setSourceObject(source);
				return vtListingContext;
			}

			// Let function comparison panel try to get a generic action context.
			// This will get the listing header context or dual listing marker margin context.
			ActionContext actionContext = functionComparisonPanel.getActionContext(event, this);
			if (actionContext != null) {
				return actionContext;
			}
			// Comparison other than dual listing can return a function association context.
			return new VTFunctionAssociationContext(tool, sourceFunction, destinationFunction,
				getExistingMatch(sourceFunction, destinationFunction));
		}
		return null;
	}
Provider for the version tracking function association table.
Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/provider/functionassociation/VTFunctionAssociationProvider.java