action_precond_list : action_precond_list action_precond_def
                               | action_precond_def
498760
def p_action_precond_list(self, p):
        ''''''
        if len(p) == 3:
            p[1].append(p[2])
            p[0] = p[1]
        elif len(p) == 2:
            p[0] = [p[1]]
573990
function _appendActionToUpdaters(node, actionMap) {
  if (node.members && node.members.static.length) {
    node.members.static = node.members.static.map(nd => _appendActionToUpdaters(nd, actionMap));
  }

  const updater = node.name;

  const action = Object.values(actionMap)
    .find(action => action.updaters.find(up => up.name === updater));

  if (!action) {
    return node;
  }
  const actionName = action.name;

  const mdContent = `
  * __Action__: [${BT}${actionName}${BT}](../actions/actions.md#${actionName.toLowerCase()})
  `;

  return _appendListToDescription(node, mdContent);
}
1278082
def get_action_methods(self):
        
        return [(name, getattr(self, name))
                for name, _ in Action.get_command_types()]
1313939
@Action(name = "List Prepender",
            outputs = {
                    @Output(RESPONSE),
                    @Output(RETURN_RESULT),
                    @Output(RETURN_CODE)
            },
            responses = {
                    @Response(text = SUCCESS, field = RETURN_CODE, value = RETURN_CODE_SUCCESS, matchType = MatchType.COMPARE_EQUAL),
                    @Response(text = FAILURE, field = RETURN_CODE, value = RETURN_CODE_FAILURE, matchType = MatchType.COMPARE_EQUAL, isOnFail = true, isDefault = true)
            })
    public Map<String, String> prependElement(@Param(value = LIST, required = true) String list,
                                              @Param(value = ELEMENT, required = true) String element,
                                              @Param(value = DELIMITER) String delimiter) {
        Map<String, String> result = new HashMap<>();
        try {
            StringBuilder sb = new StringBuilder();
            sb = StringUtils.isEmpty(list) ? sb.append(element) : sb.append(element).append(delimiter).append(list);
            result.put(RESPONSE, SUCCESS);
            result.put(RETURN_RESULT, sb.toString());
            result.put(RETURN_CODE, RETURN_CODE_SUCCESS);
        } catch (Exception e) {
            result.put(RESPONSE, FAILURE);
            result.put(RETURN_RESULT, e.getMessage());
            result.put(RETURN_CODE, RETURN_CODE_FAILURE);
        }
        return result;
    }
997894
def define_actions
      unless @action_defined
        hash = YAML.load(File.read(@file_path))
        hash.each do |k, v|
          v.each do |key, value|
            @app.class.define_action!(value["request"], value["response"])
          end
        end
        @action_defined = true
      end
    end
761388
def process_actions(action_ids=None):
    
    actions_taken = 0
    action_list = PublishAction.objects.prefetch_related(
        'content_object',
    ).filter(
        scheduled_time__lte=timezone.now(),
    )

    if action_ids is not None:
        action_list = action_list.filter(id__in=action_ids)

    for action in action_list:
        action.process_action()
        action.delete()
        actions_taken += 1

    return actions_taken
811974
def _init_action_list(self, action_filename):
        """"""

        self.actions = list()
        self.hiid_to_action_index = dict()

        f = codecs.open(action_filename, 'r', encoding='latin-1')
        first_line = True
        for line in f:
            line = line.rstrip()
            if first_line:
                # Ignore the first line
                first_line = False
            else:
                self.actions.append(GenewaysAction(line))

                latestInd = len(self.actions)-1
                hiid = self.actions[latestInd].hiid
                if hiid in self.hiid_to_action_index:
                    raise Exception('action hiid not unique: %d' % hiid)
                self.hiid_to_action_index[hiid] = latestInd
452215
def insert_action(self, action, prev_action):
        
        if isinstance(prev_action, QtWidgets.QAction):
            index = self._actions.index(prev_action)
        else:
            index = prev_action
        action.setShortcutContext(QtCore.Qt.WidgetShortcut)
        self._actions.insert(index, action)
426645
public void prependActionsToActionStateExecutionList(final Flow flow, final String actionStateId, final EvaluateAction... actions) {
        addActionsToActionStateExecutionListAt(flow, actionStateId, 0, actions);
    }
746029
function () {
            var self = this;
            var originalListAction = self.options.actions.listAction;
            self.options.actions.listAction = function (postData, jtParams) {
                return $.Deferred(function ($dfd) {

                    var input = $.extend({}, postData, {
                        skipCount: jtParams.jtStartIndex,
                        maxResultCount: jtParams.jtPageSize,
                        sorting: jtParams.jtSorting
                    });

                    originalListAction.method(input)
                        .done(function (result) {
                            $dfd.resolve({
                                "Result": "OK",
                                "Records": result.items || result[originalListAction.recordsField],
                                "TotalRecordCount": result.totalCount,
                                originalResult: result
                            });
                        })
                        .fail(function (error) {
                            self._handlerForFailOnAbpRequest($dfd, error);
                        });
                });
            };
        }
1374034
def list_action(**kwargs):
    
    def decorator(func):
        func.action = True
        func.detail = False
        func.kwargs = kwargs
        return func
    return decorator
672826
private void visitActionFieldList(final ActionInsertFact afl) {
        String factType = afl.getFactType();
        for (ActionFieldValue afv : afl.getFieldValues()) {
            InterpolationVariable var = new InterpolationVariable(afv.getValue(),
                                                                  afv.getType(),
                                                                  factType,
                                                                  afv.getField());
            if (afv.getNature() == FieldNatureType.TYPE_TEMPLATE && !vars.contains(var)) {
                vars.add(var);
            } else {
                hasNonTemplateOutput = true;
            }
        }
    }
177254
function initWithActions (actionType, actions) {
    var prev = actions[0].copy()
      , now
      , i
    for (i=1; i<actions.length; i++) {
        now = actions[i].copy()
        if (now) {
            prev = new actionType({one: prev, two: now})
        } else {
            break
        }
    }

    return prev
}
1194590
function processActionGroup(_ref2) {
			var _ref2$updateSchemaNam = _ref2.updateSchemaName,
			    updateSchemaName = _ref2$updateSchemaNam === undefined ? undefined : _ref2$updateSchemaNam,
			    _ref2$store = _ref2.store,
			    store = _ref2$store === undefined ? _store : _ref2$store,
			    _ref2$error = _ref2.error,
			    error = _ref2$error === undefined ? {} : _ref2$error,
			    _ref2$res = _ref2.res,
			    res = _ref2$res === undefined ? {} : _ref2$res,
			    _ref2$actionGroup = _ref2.actionGroup,
			    actionGroup = _ref2$actionGroup === undefined ? {} : _ref2$actionGroup;

			if (actionGroup == undefined) return;

			var actionNames = Object.keys(actionGroup);

			actionNames.forEach(function (actionName) {

				var action = actionGroup[actionName];

				// TODO: check for required fields: branch, location, operation, value || valueFunction, location || locationFunction
				// updateIn, update + updateIn, update

				// destructure action values used in processing
				var valueFunction = action.valueFunction,
				    value = action.value,
				    shouldDispatch = action.shouldDispatch,
				    uiEventFunction = action.uiEventFunction,
				    updateFunction = action.updateFunction,
				    location = action.location,
				    locationFunction = action.locationFunction,
				    operation = action.operation;

				// create action to be processed

				var $action = {};

				// update value
				$action.value = valueFunction ? valueFunction({ error: error, res: res, store: store, value: value }) : value;

				// update location
				$action.location = locationFunction ? locationFunction({ error: error, res: res, store: store, value: value }) : location;

				// add type
				$action.type = $action.location[0];

				// trim first value from location
				$action.location = $action.location.slice(1);

				// add name
				$action.name = actionName;

				// add update function params
				$action.updateFunction = updateFunction ? updateFunction.bind(null, { res: res, error: error, store: store, fromJS: _immutable.fromJS, value: value }) : undefined;

				// add operation
				if ($action.updateFunction) {
					$action.operation = 'updateIn';
				} else if (!$action.value) {
					$action.operation = 'deleteIn';
				} else {
					$action.operation = 'setIn';
				}

				// TODO: add meta information about the updateSchemaCreator

				// dispatch action depending on fire
				if (shouldDispatch == undefined || shouldDispatch({ error: error, res: res, store: store, value: value })) {

					// dispatch the action here
					store.dispatch($action);

					// fire ui event
					if (uiEventFunction) uiEventFunction({ action: action, value: value, res: res, error: error, store: store });
				}
			});
		}
343367
def action_checklist(self):
        
        actions = []
        exposure = definition(self.exposure.keywords.get('exposure'))
        actions.extend(exposure.get('actions'))

        hazard = definition(self.hazard.keywords.get('hazard'))
        actions.extend(hazard.get('actions'))

        actions.extend(specific_actions(hazard, exposure))
        return actions
378772
def skip_action(self, action):
        
        if 'skip' not in self.flags:
            self.flags['skip'] = []
        self.flags['skip'].append(action)
1326082
def response_action(self, request, queryset):  # noqa
        
        # There can be multiple action forms on the page (at the top
        # and bottom of the change list, for example). Get the action
        # whose button was pushed.
        try:
            action_index = int(request.POST.get('index', 0))
        except ValueError:  # pragma: no cover
            action_index = 0

        # Construct the action form.
        data = request.POST.copy()
        data.pop(helpers.ACTION_CHECKBOX_NAME, None)
        data.pop("index", None)

        # Use the action whose button was pushed
        try:
            data.update({'action': data.getlist('action')[action_index]})
        except IndexError:  # pragma: no cover
            # If we didn't get an action from the chosen form that's invalid
            # POST data, so by deleting action it'll fail the validation check
            # below. So no need to do anything here
            pass

        action_form = self.action_form(data, auto_id=None)
        action_form.fields['action'].choices = self.get_action_choices(request)

        # If the form's valid we can handle the action.
        if action_form.is_valid():
            action = action_form.cleaned_data['action']
            func, name, description = self.get_actions(request)[action]

            # Get the list of selected PKs. If nothing's selected, we can't
            # perform an action on it, so bail.
            if action_form.cleaned_data['select_across']:
                selected = ALL
            else:
                selected = request.POST.getlist(helpers.ACTION_CHECKBOX_NAME)

            if not selected:
                return None

            revision_field = self.model._concurrencymeta.field

            if self.check_concurrent_action:
                self.delete_selected_confirmation_template = self.get_confirmation_template()

                # If select_across we have to avoid the use of concurrency
                if selected is not ALL:
                    filters = []
                    for x in selected:
                        try:
                            pk, version = x.split(",")
                        except ValueError:  # pragma: no cover
                            raise ImproperlyConfigured('`ConcurrencyActionMixin` error.'
                                                       'A tuple with `primary_key, version_number` '
                                                       'expected:  `%s` found' % x)
                        filters.append(Q(**{'pk': pk,
                                            revision_field.attname: version}))

                    queryset = queryset.filter(reduce(operator.or_, filters))
                    if len(selected) != queryset.count():
                        messages.error(request, 'One or more record were updated. '
                                                '(Probably by other user) '
                                                'The execution was aborted.')
                        return HttpResponseRedirect(".")
                else:
                    messages.warning(request, 'Selecting all records, you will avoid the concurrency check')

            response = func(self, request, queryset)

            # Actions may return an HttpResponse, which will be used as the
            # response from the POST. If not, we'll be a good little HTTP
            # citizen and redirect back to the changelist page.
            if isinstance(response, HttpResponse):
                return response
            else:
                return HttpResponseRedirect(".")