Executes all add new items related actions which were skipped by {@see executeAddActions} method,
but may be executed after removing/modifying some arguments
979589
protected function executeAdaptiveAddActions()
    {
        // Here are several special rules:
        // 1) the siblingId argument in the 'add' action is "optional", this means that
        //    if it is not possible to add an item near to the sibling item due to it does not exist
        //    we should try to execute such 'add' action without siblingId argument
        // 2) the siblingId argument in the 'move' action is "optional", this means that
        //    if it is not possible to locate an item near to the sibling item due to it does not exist
        //    we should try to execute such 'move' action without siblingId argument
        $continue = true;
        while ($continue && !empty($this->actions[self::GROUP_ADD])) {
            $continue = false;
            foreach ($this->actions[self::GROUP_ADD] as $index => $action) {
                if (self::ADD === $action[0] && $action[2][4]) {
                    // remember siblingId for the case if the removing of it does not allow to execute the action
                    $siblingId = $this->actions[self::GROUP_ADD][$index][2][4];
                    // remove siblingId
                    $this->actions[self::GROUP_ADD][$index][2][4] = null;
                    // try to execute the action without siblingId
                    if (0 !== $this->executeDependedActions(self::GROUP_ADD)) {
                        $continue = true;
                        break;
                    } else {
                        // restore siblingId if the action was not executed
                        $this->actions[self::GROUP_ADD][$index][2][4] = $siblingId;
                    }
                } elseif (self::MOVE === $action[0] && $action[2][2]) {
                    // remember siblingId for the case if the removing of it does not allow to execute the action
                    $siblingId = $this->actions[self::GROUP_ADD][$index][2][2];
                    // remove siblingId
                    $this->actions[self::GROUP_ADD][$index][2][2] = null;
                    // try to execute the action without siblingId
                    if (0 !== $this->executeDependedActions(self::GROUP_ADD)) {
                        $continue = true;
                        break;
                    } else {
                        // restore siblingId if the action was not executed
                        $this->actions[self::GROUP_ADD][$index][2][2] = $siblingId;
                    }
                }
            }
        }
    }
214791
private void fireResultAdded(Result child, Result parent) {
    if(LOG.isDebugging()) {
      LOG.debug("Result added: " + child + " <- " + parent);
    }
    for(int i = listenerList.size(); --i >= 0;) {
      listenerList.get(i).resultAdded(child, parent);
    }
  }
690683
@Nonnull
    public ParametersAction createUpdated(Collection<? extends ParameterValue> overrides) {
        if(overrides == null) {
            ParametersAction parametersAction = new ParametersAction(parameters);
            parametersAction.safeParameters = this.safeParameters;
            return parametersAction;
        }
        List<ParameterValue> combinedParameters = Lists.<ParameterValue>newArrayList(overrides);
        Set<String> names = newHashSet();

        for(ParameterValue v : overrides) {
            if (v == null) continue;
            names.add(v.getName());
        }

        for (ParameterValue v : parameters) {
            if (v == null) continue;
            if (!names.contains(v.getName())) {
                combinedParameters.add(v);
            }
        }

        return new ParametersAction(combinedParameters, this.safeParameters);
    }
1148225
private void executeStrategy(
            Traversal.Admin<?, ?> traversal, GraphStep<?, ?> graphStep, TraversalFilterStep<Vertex> filterStep,
            String propertyKey, String label) {

        JanusPreviousPropertyStep newStep = new JanusPreviousPropertyStep(traversal, propertyKey, label);
        traversal.removeStep(filterStep);
        TraversalHelper.replaceStep(graphStep, newStep, traversal);
    }
1069524
public void performAdd(InputStream in, String baseURI, RDFFormat dataFormat, Transaction tx, Resource... contexts) throws RDFParseException, MarkLogicSesameException {
        try {
            graphManager.setDefaultMimetype(dataFormat.getDefaultMIMEType());
            if (dataFormat.equals(RDFFormat.NQUADS) || dataFormat.equals(RDFFormat.TRIG)) {
                graphManager.mergeGraphs(new InputStreamHandle(in),tx);
            } else {
                if (notNull(contexts) && contexts.length > 0) {
                    for (int i = 0; i < contexts.length; i++) {
                        if (notNull(contexts[i])) {
                            graphManager.mergeAs(contexts[i].toString(), new InputStreamHandle(in), getGraphPerms(), tx);
                        } else {
                            graphManager.mergeAs(DEFAULT_GRAPH_URI, new InputStreamHandle(in),getGraphPerms(), tx);
                        }
                    }
                } else {
                    graphManager.mergeAs(DEFAULT_GRAPH_URI, new InputStreamHandle(in),getGraphPerms(), tx);
                }
            }
            in.close();
        } catch (FailedRequestException e) {
            logger.error(e.getLocalizedMessage());
            throw new RDFParseException("Request to MarkLogic server failed, check input is valid.");
        } catch (IOException e) {
            logger.error(e.getLocalizedMessage());
            throw new MarkLogicSesameException("IO error");
        }
    }
1335928
void handleAdd() {
        BoofSwingUtil.checkGuiThread();
        java.util.List<File> paths = browser.getSelectedFiles();

        for (int i = 0; i < paths.size(); i++) {
            File f = paths.get(i);

            // if it's a directory add all the files in the directory
            if( f.isDirectory() ) {
                java.util.List<String> files = UtilIO.listAll(f.getPath());
                Collections.sort(files);
                for (int j = 0; j < files.size(); j++) {
                    File p = new File(files.get(j));
                    // Note: Can't use mimetype to determine if it's an image or not since it isn't 100% reliable
                    if( p.isFile() ) {
                        selected.addPath(p);
                    }
                }
            } else {
                selected.addPath(f);
            }
        }
    }
317969
def add_recipe_actions(self, recipe_actions):
        
        for action_name, action in recipe_actions:
            self._recipe_actions[action_name] = 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
565216
function (newItems) {

            var itemsListener = this._itemsListener;
            var json = this.json;
            var oldItems = this._data.items;
            var numberOfItems;

            if (oldItems == newItems) {
                // items did not change
                // return;
                numberOfItems = newItems.length;
            } else {
                if (oldItems) {
                    // remove the listener on the old items object:
                    for (var i = 0, l = oldItems.length; i < l; i++) {
                        json.removeListener(oldItems[i], null, itemsListener);
                    }
                }
                json.setValue(this._data, "items", newItems);

                if (newItems) {
                    numberOfItems = newItems.length;
                    // add the listener on the new items object:
                    for (var i = 0, l = newItems.length; i < l; i++) {
                        json.addListener(newItems[i], null, itemsListener);
                    }
                    var view = this._data.itemsView;
                    if (view) {
                        view.initialArray = newItems;
                        view.refresh(view.CHANGED_INITIAL_ARRAY);
                    }
                }
            }

            if (this._data.displayOptions) {
                this._calcRowCols(this._data.displayOptions.flowOrientation, this._data.numberOfRows, this._data.numberOfColumns, numberOfItems);
            }

        }
1117533
private function executeExtraUpdates()
    {
        foreach ($this->extraUpdates as $oid => $update) {
            [$entity, $changeset] = $update;

            $this->entityChangeSets[$oid] = $changeset;

            $this->getEntityPersister(get_class($entity))->update($entity);
        }

        $this->extraUpdates = [];
    }
1119541
function updateActions() {
        this.plugin('done', function () {
          var cmd;
          if (envOptions['update-actions']) {
            // Don't disable actions since this is mostly for development.
            cmd = 'python manage.py update_actions';

            childProcess.exec(cmd, function (err, stdout, stderr) {
              console.log('\n' + BOLD + 'Updating Actions' + END_BOLD);
              console.log(stdout);
              if (stderr) {
                console.error(stderr);
              }
            });
          }
        });
      }
529366
protected function appendActionsColumn()
    {
        if (!$this->option('show_actions')) {
            return;
        }

        $this->addColumn('__actions__', trans('admin.action'))
            ->displayUsing($this->actionsClass, [$this->actionsCallback]);
    }
958699
def addItems(self, menus, processed=None):
        
        if processed is None:
            processed = []
        
        for menu in menus:
            for action in menu.actions():
                # since we can have 1 action in more than 1 submenu, we
                # will want to make sure we're only adding a unique one
                # so we don't have duplicates
                text = nativestring(action.text())
                if text in processed or action.isSeparator():
                    continue
                
                processed.append(text)
                
                if text and unwrapVariant(action.data()) != 'menu':
                    item = XTreeWidgetItem(self._completer, [text])
                    item.setFixedHeight(20)
                    item.setIcon(0, action.icon())
                    item.setToolTip(0, action.toolTip())
                    item.setData(0, Qt.UserRole, wrapVariant(action))
902268
private void add( final List<String> arguments,
                      final Collection<String> argumentsToAdd )
    {
        if( argumentsToAdd != null && argumentsToAdd.size() > 0 )
        {
            arguments.addAll( argumentsToAdd );
        }
    }
107112
def _on_shortcut_changed(self, renderer, path, new_shortcuts):
        
        action = self.shortcut_list_store[int(path)][self.KEY_STORAGE_ID]
        old_shortcuts = self.gui_config_model.get_current_config_value("SHORTCUTS", use_preliminary=True)[action]

        from ast import literal_eval
        try:
            new_shortcuts = literal_eval(new_shortcuts)
            if not isinstance(new_shortcuts, list) and \
               not all([isinstance(shortcut, string_types) for shortcut in new_shortcuts]):
                raise ValueError()
        except (ValueError, SyntaxError):
            logger.warning("Shortcuts must be a list of strings")
            new_shortcuts = old_shortcuts

        shortcuts = self.gui_config_model.get_current_config_value("SHORTCUTS", use_preliminary=True,  default={})
        shortcuts[action] = new_shortcuts
        self.gui_config_model.set_preliminary_config_value("SHORTCUTS", shortcuts)
        self._select_row_by_column_value(self.view['shortcut_tree_view'], self.shortcut_list_store,
                                         self.KEY_STORAGE_ID, action)
1080081
def add(self, method_class, action, version=None):
        
        by_version = self._by_action.setdefault(action, {})
        if version in by_version:
            raise RuntimeError("A method was already registered for action"
                               " %s in version %s" % (action, version))
        by_version[version] = method_class
408642
public void addNew() throws DBException
    {
        this.getRecord().setEditMode(Constants.EDIT_NONE);
        m_objectID = null;
        m_dataSource = null;
        try   {
            this.doAddNew();
            m_iRecordStatus = DBConstants.RECORD_NEW;
        } catch (DBException ex)   {
            throw ex;
        }
        this.getRecord().setEditMode(Constants.EDIT_ADD);   // I do this before the handleNewRecord behaviors do anything
        this.getRecord().handleNewRecord();   // Display Fields
    }