@Override
	protected boolean isEnabledForContext(ListingActionContext context) {
		if (context.hasSelection() || context.getAddress() == null) {
			return false;
		}
		ProgramLocation location = context.getLocation();
		if (!(location instanceof VariableLocation) &&
			!(location instanceof FunctionSignatureFieldLocation)) {
			return false;
		}

		if (location instanceof FunctionSignatureFieldLocation) {
			updatePopupMenu(true);
		}
		else {
			updatePopupMenu(false);
		}

		Function function = functionPlugin.getFunction(context);
		return ((function != null) && (function.hasVarArgs()));
	}
Method called when the action is invoked.
@param ev details regarding the invocation of this action
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/DeleteVarArgsAction.java