@Override
	protected boolean isEnabledForContext(ListingActionContext context) {
		if (context.hasSelection() || context.getAddress() == null) {
			return false;
		}
		ProgramLocation location = context.getLocation();
		if (location instanceof FunctionLocation && !(location instanceof VariableLocation)) {
			// Don't allow delete function unless we are on the real function
			return location.getAddress().equals(((FunctionLocation) location).getFunctionAddress());
		}
		return false;
	}
Creates a new action with the given name and associated to the given
plugin.
@param plugin the plugin this action is associated with.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/DeleteFunctionAction.java