private void createActions() {

		HelpLocation help = new HelpLocation("FunctionComparison", "Function_Comparison_Actions");

		new ActionBuilder("Function Comparison", getName())
				.popupMenuPath("Compare Function(s)")
				.popupMenuGroup("Functions", "Z1")
				.description("Adds the selected function(s) to the current comparison window.")
				.helpLocation(help)
				.withContext(FunctionSupplierContext.class)
				.enabledWhen(c -> !isListing(c) && c.hasFunctions())
				.onAction(c -> addToComparison(c.getFunctions()))
				.buildAndInstall(tool);

		// same action as above, but with an extra pull right when shown in the listing
		new ActionBuilder("Function Comparison (Listing)", getName())
				.popupMenuPath("Function", "Compare Function(s)")
				.popupMenuGroup("Functions", "Z1")
				.description("Adds the selected function(s) to the current comparison window.")
				.helpLocation(help)
				.withContext(FunctionSupplierContext.class)
				.enabledWhen(c -> isListing(c) && c.hasFunctions())
				.onAction(c -> addToComparison(c.getFunctions()))
				.buildAndInstall(tool);

		new ActionBuilder("New Function Comparison", getName())
				.popupMenuPath("Compare in New Window")
				.popupMenuGroup("Functions", "Z2")
				.description("Compare the selected function(s) in a new comparison window.")
				.helpLocation(help)
				.withContext(FunctionSupplierContext.class)
				.enabledWhen(
					c -> !isListing(c) && c.hasFunctions() && hasExistingComparison())
				.onAction(c -> createComparison(c.getFunctions()))
				.buildAndInstall(tool);

		// same action as above, but with an extra pull right when shown in the listing
		new ActionBuilder("New Function Comparison (Listing)", getName())
				.popupMenuPath("Function", "Compare in New Window")
				.popupMenuGroup("Functions", "Z2")
				.description("Compare the selected function(s) in a new comparison window.")
				.helpLocation(help)
				.withContext(FunctionSupplierContext.class)
				.enabledWhen(c -> isListing(c) && c.hasFunctions() && hasExistingComparison())
				.onAction(c -> createComparison(c.getFunctions()))
				.buildAndInstall(tool);

	}
Overridden to listen for two event types:
<li>Object Restored: In the event of a redo/undo that affects a function
being shown in the comparison provider, this will allow tell the provider
to reload</li>
<li>Object Removed: If a function is deleted, this will tell the provider
to purge it from the view</li>
Ghidra/Features/CodeCompare/src/main/java/ghidra/features/codecompare/plugin/FunctionComparisonPlugin.java