@Override
	public void processEvent(PluginEvent event) {
		super.processEvent(event);

		//Msg.info(this, "TaintPlugin -> processEvent: " + event.toString() );

		if (event instanceof ProgramClosedPluginEvent) {
			Program program = ((ProgramClosedPluginEvent) event).getProgram();
			if (currentProgram != null && currentProgram.equals(program)) {
				currentProgram = null;
				taintProvider.doSetProgram(null);
			}
			return;
		}

		if (taintProvider == null) {
			return;
		}

		if (event instanceof ProgramActivatedPluginEvent) {
			currentProgram = ((ProgramActivatedPluginEvent) event).getActiveProgram();
			taintProvider.doSetProgram(currentProgram);
			if (currentProgram != null) {
				SpecExtension.registerOptions(currentProgram);
			}

		}
		else if (event instanceof ProgramLocationPluginEvent) {

			// user changed their location in the program; this may be a function change.

			taintProvider.contextChanged();
			ProgramLocation location = ((ProgramLocationPluginEvent) event).getLocation();
			Address address = location.getAddress();

			if (address.isExternalAddress()) {
				// ignore external functions when it comes to taint.
				return;
			}

			if (currentProgram != null) {
				// The user loaded a program for analysis.
				Listing listing = currentProgram.getListing();
				Function f = listing.getFunctionContaining(address);
				// We are in function f
				if (currentFunction == null || !currentFunction.equals(f)) {
					// In the PAST we were in a function and the program location moved us into a new function.
					String cfun = "NULL";
					String nfun = "NULL";

					if (currentFunction != null) {
						cfun = currentFunction.getEntryPoint().toString();
					}

					if (f != null) {
						nfun = f.getEntryPoint().toString();
					}

					Msg.info(this, "Changed from function: " + cfun + " to function " + nfun);
					currentFunction = f;
					taintDecompMarginProvider.functionChanged();
					taintProvider.setTaint();
				}
			}
		}
	}
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