@Override
	public void processEvent(PluginEvent event) {
		super.processEvent(event);
		Program eventProgram = null;
		if (event instanceof ProgramActivatedPluginEvent) {
			ProgramActivatedPluginEvent ev = (ProgramActivatedPluginEvent) event;
			eventProgram = ev.getActiveProgram();
		}
		else if (event instanceof ProgramOpenedPluginEvent) {
			ProgramOpenedPluginEvent ev = (ProgramOpenedPluginEvent) event;
			eventProgram = ev.getProgram();
		}
		else if (event instanceof ProgramClosedPluginEvent) {
			ProgramClosedPluginEvent ev = (ProgramClosedPluginEvent) event;
			eventProgram = ev.getProgram();
		}
		else if (event instanceof ProgramClosedPluginEvent) {
			ProgramClosedPluginEvent ev = (ProgramClosedPluginEvent) event;
			eventProgram = ev.getProgram();
		}
		else if (event instanceof ProgramVisibilityChangePluginEvent) {
			ProgramVisibilityChangePluginEvent ev = (ProgramVisibilityChangePluginEvent) event;
			eventProgram = ev.getProgram();
		}
		SarifController controller = sarifControllers.get(eventProgram);
		if (controller != null) {
			if (event instanceof ProgramClosedPluginEvent) {
				controller.dispose();
				sarifControllers.remove(eventProgram, controller);
			}
			else if (event instanceof ProgramVisibilityChangePluginEvent) {
				ProgramVisibilityChangePluginEvent ev = (ProgramVisibilityChangePluginEvent) event;
				controller.showTable(ev.isProgramVisible());
			}
			else {
				controller.showTable(true);
			}
		}
	}
A {@link ProgramPlugin} for reading in sarif files
Ghidra/Features/Sarif/src/main/java/sarif/SarifPlugin.java