Registers an action globally for all views.

@param actionId ID of the action.
@param action will be available in views with the selected ID.
498618
public void addViewAction(final String actionId, final ActorConsumer<?, ?> action) {
        parser.getData().addActorConsumer(actionId, action);
    }
1278062
public void addActionButton(final ToolbarAction action) {
		final IButton button = new IButton();
		button.setWidth(buttonSize);
		button.setHeight(buttonSize);
		button.setIconSize(buttonSize - WidgetLayout.toolbarStripHeight);
		button.setIcon(action.getIcon());
		button.setActionType(SelectionType.BUTTON);
		button.addClickHandler(action);
		button.setShowRollOver(false);
		button.setShowFocused(false);
		button.setTooltip(action.getTooltip());
		button.setDisabled(action.isDisabled());

		if (getMembers() != null && getMembers().length > 0) {
			LayoutSpacer spacer = new LayoutSpacer();
			spacer.setWidth(2);
			super.addMember(spacer);
		}
		action.addToolbarActionHandler(new ToolbarActionHandler() {

			public void onToolbarActionDisabled(ToolbarActionDisabledEvent event) {
				button.setDisabled(true);
			}

			public void onToolbarActionEnabled(ToolbarActionEnabledEvent event) {
				button.setDisabled(false);
			}
		});
		super.addMember(button);
	}
1041960
public void setAction(String action) {
        try {
            this.action = new URI(action);
        } catch (URISyntaxException e) {
            throw new CitrusRuntimeException("Invalid action uri", e);
        }
    }
1081400
public static IAction getRegisteredAction(String id) {
        IAction action = getRegistry(false).get(id);
        return action == null ? getRegistry(true).get(id) : action;
    }
391042
public function moveNode(string $id = null, string $action = ''): void
    {
        $moveActions = ['up', 'down'];
        if (!in_array($action, $moveActions)) {
            $this->Flash->error((string)__('Unknown move action.'));
            $this->redirect(['action' => 'index']);

            return;
        }
        $menuItem = $this->MenuItems->get($id);
        $moveFunction = 'move' . $action;
        if ($this->MenuItems->{$moveFunction}($menuItem)) {
            $this->Flash->success((string)__('{0} has been moved {1} successfully.', $menuItem->get('label'), $action));
        } else {
            $this->Flash->error((string)__('Fail to move {0} {1}.', $menuItem->get('label'), $action));
        }

        $this->redirect($this->referer());
    }
623808
def action(cls, view):
        """"""
        name = "%s:%s" % (cls.name, view.__name__)
        path = "%s/%s" % (cls.url, view.__name__)
        cls.actions.append((view.__doc__, path))
        return cls.register(path, name=name)(view)
1024437
public function register($method, $url, $action)
    {
        if (in_array($method, $this->_methods)) {
            if (is_array($action)) {
                if (!empty($action)) {
                    $exp = explode('@', $action['uses']);
                    $this->_routes[] = [
                        'controller' => $exp[0],
                        'action'     => $exp[1],
                        'method'     => $method,
                        'uri'        => $url,
                    ];
                } else {
                    throw new \Exception('Cannot leave the action empty!');
                }
            } else {
                $exp = explode('@', $action);
                $this->_routes[] = [
                    'controller' => $exp[0],
                    'action'     => $exp[1],
                    'method'     => $method,
                    'uri'        => $url,
                ];
            }
        } else {
            throw new \Exception('Invalid routing method!');
        }
    }
1140167
public void setActions(com.google.api.ads.admanager.axis.v201902.ProgressAction[] actions) {
        this.actions = actions;
    }
978898
public static Result onUiAsync(Action action) {
        if (Looper.myLooper() == Looper.getMainLooper()) {
            action.call();
            return new ActionAsyncTask(action, true);
        }
        ActionAsyncTask task = new ActionAsyncTask(action);
        getUiPoster().async(task);
        return task;
    }
896794
public void setActionSequence (String action)
    {
        // sanity check
        if (action == null) {
            log.warning("Refusing to set null action sequence " + this + ".", new Exception());
            return;
        }

        // no need to noop
        if (action.equals(_action)) {
            return;
        }
        _action = action;
        updateActionFrames();
    }
509521
public static void addAction(Set<Action> aas, Action action, boolean condition) {

        if (condition) {
            aas.add(action);
        }
    }
1072607
def register_action(self, action):
        
        assert action.value not in self.actions
        self.actions[action.value] = action
254774
function Action(name) {
    Action.super_.call(this);
    this.id = ActionUniqueId();
    this.set('ActionID', this.id);
    this.set('Action', name);
}
501886
public static void regist(EventType[] eventTypes, Object action) {
        if (eventTypes != null) {
            for (EventType eventType : eventTypes) {
                regist(eventType, action);
            }
        }
    }
798838
public void addActionsToActionStateExecutionListAt(final Flow flow, final String actionStateId, final int position, final EvaluateAction... actions) {
        val actionState = getState(flow, actionStateId, ActionState.class);
        val currentActions = new ArrayList<Action>();
        val actionList = actionState.getActionList();
        actionList.forEach(currentActions::add);
        val index = position < 0 || position == Integer.MAX_VALUE ? currentActions.size() : position;
        currentActions.forEach(actionList::remove);
        Arrays.stream(actions).forEach(a -> currentActions.add(index, a));
        actionList.addAll(currentActions.toArray(Action[]::new));
    }
363718
public void invokeNodeAction (String nodeName, NodeAction action)
    {
        PeerNode peer = _peers.get(nodeName);
        if (peer != null) {
            if (peer.nodeobj != null) {
                peer.nodeobj.peerService.invokeAction(flattenAction(action));

            } else {
                log.warning("Dropped NodeAction", "nodeName", nodeName, "action", action);
            }

        } else if (Objects.equal(nodeName, _nodeName)) {
            invokeAction(null, flattenAction(action));
        }
    }
58170
public RouteBuilder action(String action) {
        boolean hasActionSegment = false;
        for (Segment segment : segments) {
            hasActionSegment = segment.action;
        }

        if(action!= null && hasActionSegment){
            throw new IllegalArgumentException("Cannot combine {action} segment and .action(\"...\") method. Failed route: " + routeConfig);
        }

        this.actionName = action;
        return this;
    }