@Override
	protected void decompilerActionPerformed(DecompilerActionContext context) {
		Program program = context.getProgram();
		PluginTool tool = context.getTool();

		Task defaultQueryTask = new Task(title, true, true, true, true) {
			@Override
			public void run(TaskMonitor monitor) {
				TaintState state = plugin.getTaintState();
				state.setCancellation(false);
				monitor.initialize(program.getFunctionManager().getFunctionCount());
				state.queryIndex(program, tool, queryType);
				state.setCancellation(monitor.isCancelled());
				monitor.clearCancelled();
			}
		};

		// This task will block -- see params above.
		// The blocking is necessary because of the table provider we create below.
		// It is problematic to do GUI stuff in the thread.
		// We still get a progress bar and option to cancel.
		tool.execute(defaultQueryTask);

		TaintState state = plugin.getTaintState();
		if (!state.wasCancelled()) {
			TaintFormat format = state.getOptions().getTaintOutputForm();
			if (!format.equals(TaintFormat.NONE)) {
				SarifService sarifService = plugin.getSarifService();
				sarifService.getController().setDefaultGraphHander(SarifTaintGraphRunHandler.class);
				sarifService.showSarif(desc, state.getData());
			}

			plugin.consoleMessage("executing query...");
			TaintProvider provider = plugin.getProvider();
			provider.setTaint();

			plugin.consoleMessage("query complete");
			state.setCancellation(false);
		}
		else {
			plugin.consoleMessage("Source-Sink query was cancelled.");

		}
	}
Action triggered from a specific token in the decompiler window to mark a variable as a source or
sink and generate the requisite query. This can be an input parameter, a stack variable, a
variable associated with a register, or a "dynamic" variable.
Ghidra/Features/DecompilerDependent/src/main/java/ghidra/app/plugin/core/decompiler/taint/actions/TaintAbstractQueryAction.java