@Override
	public void actionPerformed(ProgramActionContext context) {

		Program program = context.getProgram();

		FunctionManager functionMgr = program.getFunctionManager();
		Function func;
		if (context instanceof ListingActionContext) {
			ListingActionContext listingContext = (ListingActionContext) context;
			func = functionMgr.getFunctionAt(listingContext.getAddress());
		}
		else if (context instanceof ProgramSymbolActionContext) {
			ProgramSymbolActionContext symbolContext = (ProgramSymbolActionContext) context;
			Symbol symbol = symbolContext.getFirstSymbol();
			if (symbol == null) {
				return; // assume symbol removed
			}
			func = (Function) symbol.getObject();
		}
		else {
			throw new RuntimeException("Invalid context for action");
		}

		if (func == null || !func.isThunk()) {
			return;
		}

		int resp = OptionDialog.showYesNoDialog(funcPlugin.getTool().getActiveWindow(),
			"Revert Thunk Confirmation",
			"Do you wish to revert function '" + func.getName() + "' to a non-thunk Function?");
		if (resp != OptionDialog.YES_OPTION) {
			return;
		}

		funcPlugin.getTool().execute("Revert Thunk", program, () -> func.setThunkedFunction(null));
	}
Method called when the action is invoked.
@param ActionEvent details regarding the invocation of this action
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/RevertThunkFunctionAction.java