Add an action to the entity to be built. Actions are options according to the Siren specification.
@param action cannot be <code>null</code>.
@return <code>this</code> builder, never <code>null</code>.
349555
public EntityBuilder addAction(Action action) {
    	if(action == null) {
    		throw new IllegalArgumentException("action cannot be null.");
    	}
    	addStep("_addAction", new Object[] { action }, true);
        return this;
    }
931533
function(action, implementation){
            this.resolvableActions                      = this.resolvableActions                        || {};
            this.resolvableActions[action]              = this.resolvableActions[action]                || {};
            this.resolvableActions[action].actionName   = this.resolvableActions[action].actionName     || action;

            implementation = implementation || RL.ResolvableAction.Types[action];
            this.resolvableActions[action] = Object.create(implementation);
            // merge could be used instead of Object.create but is less desirable
            // RL.Util.merge(this.resolvableAction.Types[action], implementation);

            if(this.resolvableActions[action].init){
                this.resolvableActions[action].init.call(this);
            }
        }
113890
public TaskBuilder<Result> action(final Callable<Result> action) {
        if (action instanceof TaskCallable) {
            this.action = (TaskCallable<Result>) action;
        } else {
            this.action = new WrappedCallable<Result>(action);
        }
        return this;
    }
736766
public static <A> FutureCallback<A> onFailureDo(final Action<Throwable> action) {
        return futureCallback(Actions.<A>nothing(), action);
    }
1263497
protected function addAction($action)
    {
        $args = func_get_args();
        array_shift($args);
        $this->actionQueue []= array('action' => $action, 'args' => $args);
    }
432374
public static String buildAction(Class<?> clazz, String action) {
        return new StringBuilder().append(clazz.getCanonicalName()).append(".").append(action).toString();
    }
467309
public Dialog positiveAction(CharSequence action){
        mPositiveAction.setText(action);
        mPositiveAction.setVisibility(TextUtils.isEmpty(action) ? View.GONE : View.VISIBLE);
        return this;
    }
195430
def build_action(self, action):
        
        try:
            self.action = Action.from_string(action)
        except ValueError:
            raise

        return self
88084
public <T> T doInTransaction(final SpecificTxAction<T, C> action) {
        return doInTransaction(null, action);
    }
19356
def addAction(self, action, checked=None, autoBuild=True):
        
        # clear the holder
        actions = self._actionGroup.actions()
        if actions and actions[0].objectName() == 'place_holder':
            self._actionGroup.removeAction(actions[0])
            actions[0].deleteLater()
        
        # create an action from the name
        if not isinstance(action, QAction):
            action_name = nativestring(action)
            action = QAction(action_name, self)
            action.setObjectName(action_name)
            action.setCheckable(self.isCheckable())
            
            # auto-check the first option
            if checked or (not self._actionGroup.actions() and checked is None):
                action.setChecked(True)
        
        elif self.isCheckable():
            action.setCheckable(True)
            if not self.currentAction():
                action.setChecked(True)
        
        self._actionGroup.addAction(action)
        
        if autoBuild:
            self.rebuild()
        
        return action
365576
def add(self, action):
        """"""
        self._state_machine.transition_to_add()
        self._actions.append(action)
611485
public T create(ActionContext actionContext) {
		try {
			T action;
			Class[] actionConstructorParams = actionConstructor.getParameterTypes();
			switch (actionConstructorParams.length) {
				case 0:
					action = actionConstructor.newInstance();
					break;
				case 1:
					if (actionConstructorParams[0].equals(ActionContext.class)) {
						action = actionConstructor.newInstance(actionContext);
					} else {
						throw new IllegalStateException("Unknown argument type in action constructor " + actionConstructorParams[0].getName());
					}
					break;
				default:
					throw new IllegalStateException("Invalid argument number in action constructor: " + actionConstructorParams.length);
			}
			return action;
		} catch (InstantiationException | InvocationTargetException | IllegalAccessException instantiationException) {
			throw new IllegalStateException("Failed to create action", instantiationException);
		}
	}
44940
public void addAction(int icon, CharSequence title, Action.OnActionListener listener) {
        addAction(icon, title, listener, null, null, null, null);
    }
1357022
public function addIntendedAction($action)
    {
        if (empty($this->current_node->type) || $this->current_node->type == 'welcome') {
            return;
        }

        // If it's ->then() intended action. We'll save next action as id
        if (is_callable($action)) {
            $related = $this->current_node;

            $then_node = $this->persistNode([
                [
                    'type'    => 'callback',
                    'content' => $action,
                ],
            ], 'intended', 'IA#' . $related->id);

            $related->wait = $then_node->id;

            $related->save();
        } else {
            $this->current_node->wait = $action;

            $this->current_node->save();
        }
    }
1040387
public function addAction($action)
    {
        if (!$action instanceof ActionInterface) {
            return $this;
        }

        $name = $action->getIdentifier();

        if (empty($name)) {
            return $this;
        }

        $this->actions[] = $action;

        return $this;
    }
196606
public Action toAction() {
    Action action = CommanderUtils.createAction(this, this.variableNames());
    return this.description != null ?
        named(this.description, action) :
        action;
  }
314726
@Override
    public void setAction(final Runnable action) {
        super.setAction(new Runnable() {
            @Override
            public void run() {
                if (!isRunning) {
                    thread = new Thread(wrappedAction(action), "wunderboss-daemon-thread[" + name + "]");
                    thread.start();
                    isRunning = true;
                }
            }
        });
    }