private void createActions() {

		TaintPlugin plugin = this;

		DockingAction exportAllAction = new DockingAction("ExportFacts", HELP_LOCATION) {

			@Override
			public void actionPerformed(ActionContext context) {
				GhidraState ghidraState = new GhidraState(tool, null, currentProgram,
					currentLocation, currentHighlight, currentHighlight);
				GhidraScript exportScript = state.getExportScript(consoleService, false);
				if (exportScript != null) {
					RunPCodeExportScriptTask export_task =
						new RunPCodeExportScriptTask(tool, exportScript, ghidraState, consoleService);
					tool.execute(export_task);
				}
			}

			@Override
			public boolean isEnabledForContext(ActionContext context) {
				return plugin.getCurrentProgram() != null;
			}

		};

		exportAllAction.setMenuBarData(
			new MenuData(new String[] { "Tools", "Source-Sink", "Export PCode Facts" }));

		DockingAction saveTableDataAction = new DockingAction("InitializeIndex", HELP_LOCATION) {
			@Override
			public void actionPerformed(ActionContext context) {
				CreateTargetIndexTask index_task =
					new CreateTargetIndexTask(plugin, plugin.getCurrentProgram());
				tool.execute(index_task);
			}

			@Override
			public boolean isEnabledForContext(ActionContext context) {
				return plugin.getCurrentProgram() != null;
			}
		};

		saveTableDataAction.setMenuBarData(
			new MenuData(new String[] { "Tools", "Source-Sink", "Initialize Program Index" }));

		DockingAction deleteFactsAndIndex = new DockingAction("DeleteIndex", HELP_LOCATION) {
			@Override
			public void actionPerformed(ActionContext context) {
				PurgeIndexTask index_task = new PurgeIndexTask(plugin, plugin.getCurrentProgram());
				tool.execute(index_task);
			}

			@Override
			public boolean isEnabledForContext(ActionContext context) {
				return plugin.getCurrentProgram() != null;
			}
		};

		deleteFactsAndIndex.setMenuBarData(
			new MenuData(new String[] { "Tools", "Source-Sink", "Delete Facts and Index" }));

		DockingAction exportFuncAction = new DockingAction("ReexportFacts", HELP_LOCATION) {

			@Override
			public void actionPerformed(ActionContext context) {
				GhidraState ghidraState = new GhidraState(tool, null, currentProgram,
					currentLocation, currentHighlight, currentHighlight);
				GhidraScript exportScript = state.getExportScript(consoleService, true);
				RunPCodeExportScriptTask export_task =
					new RunPCodeExportScriptTask(tool, exportScript, ghidraState, consoleService);
				tool.execute(export_task);
			}

			@Override
			public boolean isEnabledForContext(ActionContext context) {
				return plugin.getCurrentProgram() != null;
			}

		};

		exportFuncAction.setMenuBarData(
			new MenuData(new String[] { "Tools", "Source-Sink", "Re-export Function Facts" }));

		tool.addAction(deleteFactsAndIndex);
		tool.addAction(exportAllAction);
		tool.addAction(exportFuncAction);
		tool.addAction(saveTableDataAction);
	}
Apparently, we create fake function markup for external functions.  Thus, there is no
real function at that address and our plugin has to do some work to find out where
we 'hang' references to the external function, which is itself a Function.  These 
fake function will usually just be a pointer to another function.

@param function the function to resolve; if it is not null, then it will be used
@param address the address for which to find a function
@return either the given function if non-null, or a function being referenced from the
        given address.
Ghidra/Features/DecompilerDependent/src/main/java/ghidra/app/plugin/core/decompiler/taint/TaintPlugin.java