Process the "Add" toolbar command.
@return  true    If command was handled
507094
public boolean onAdd()
    {
        Record record = this.getMainRecord();
        if (record == null)
            return false;

        try {
            if (record.isModified(false))
            {
                if (record.getEditMode() == Constants.EDIT_IN_PROGRESS)
                    record.set();
                else if (record.getEditMode() == Constants.EDIT_ADD)
                    record.add();
            }
            record.addNew();
            this.clearStatusText();
        } catch(DBException ex) {
            this.displayError(ex);
            return false;
        }
        return true;
    }
1087480
def update_attribute_toolbar(self, key=None):
        

        if key is None:
            key = self.actions.cursor

        post_command_event(self, self.ToolbarUpdateMsg, key=key,
                           attr=self.code_array.cell_attributes[key])
89131
public static void add() {

        String current = System.getProperties().getProperty(HANDLER_PKGS, "");
        if (current.length() > 0) {
            if (current.contains(PKG)) {
                return;
            }
            current = current + "|";
        }
        System.getProperties().put(HANDLER_PKGS, current + PKG);

    }
533034
public boolean onBack()
    {
        BasePanel parent = this.getParentScreen();
        if (parent == null)
            return false;
        parent.popHistory(1, false);        // Pop command for this screen
        String strLastCommand = parent.popHistory(1, false);
        if (strLastCommand != null)		// I don't back up into the browser history if the user hit the java back button.
        {	// If that wasn't the first screen, redo pop and update the browser this time
        	parent.pushHistory(strLastCommand, false);
        	strLastCommand = parent.popHistory(1, true);
        }
        if ((strLastCommand == null) || (strLastCommand.length() == 0))
        {
            if (parent.getParentScreen() != null)
                if (!(parent.getParentScreen() instanceof FrameScreen))
                    return parent.onBack();
            // ++Add++ No more to pop, display home screen (if push-down gets messed up)
            parent.pushHistory(this.getScreenURL(), false);    // This is the first screen in the stack
        }
        else
            this.handleCommand(strLastCommand, this, ScreenConstants.USE_SAME_WINDOW | ScreenConstants.DONT_PUSH_TO_BROWSER);     // Process the last command
        return true;    // Handled
    }
1249867
public boolean process()
	{
		boolean continueIterate = true;
		boolean found = false;
		String attempt = getCurrentAttempt();
		while (continueIterate)
		{
			if (attempt.equals(toCheckAgainst))
			{
				found = true;
				break;
			}
			attempt = getCurrentAttempt();
			continueIterate = increment();
		}
		return found;
	}
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);
            }
        }
    }
1330263
protected void doExecuteCommand() {
        if (this.commandExecutor instanceof ParameterizableActionCommandExecutor) {
            ((ParameterizableActionCommandExecutor) this.commandExecutor).execute(getParameters());
        }
        else {
        	if (this.commandExecutor != null) {
        		this.commandExecutor.execute();
        	}
        }
    }
520956
public void addCommand(String key, Command<? super T> handler) {
    commands.put(key, handler);
  }
573146
private boolean handleCommandImpl(String[] args) throws IOException, SQLException, Throwable {
		try {
			// Fork to background task
			if(args.length>0 && "&".equals(args[args.length-1])) {
				String[] newArgs;
				if(args.length==1) {
					newArgs = AoArrays.EMPTY_STRING_ARRAY;
				} else {
					newArgs = new String[args.length-1];
					System.arraycopy(args, 0, newArgs, 0, args.length-1);
				}
				ShellInterpreter shell=newShellInterpreter(in, out, err, newArgs);
				shell.parent=this;
				synchronized(jobs) {
					jobs.add(shell);
					if(isInteractive) {
						out.print('[');
						out.print(jobs.size());
						out.print("] ");
						out.println(shell.pid);
						out.flush();
					}
					shell.start();
				}
				return true;
			} else {
				return handleCommand(args);
			}
		} catch(ThreadDeath TD) {
			throw TD;
		} catch(Throwable T) {
			if(isInteractive) {
				ErrorPrinter.printStackTraces(T, err);
				err.flush();
				return true;
			} else throw T;
		}
	}
800195
public void addCommand(Command command) {
        if(command == null)
            throw new IllegalArgumentException();

        if(_frozen)
            throw new IllegalStateException();

        Command[] results = new Command[_commands.length + 1];
        System.arraycopy(_commands, 0, results, 0, _commands.length);
        results[_commands.length] = command;
        _commands = results;
    }
688511
def add_command(self, handler, name=None):
        
        if name is None:
            name = docstring_to_subcommand(handler.__doc__)

        # TODO: Prevent overwriting 'help'?
        self._commands[name] = handler
1319764
public boolean process(final byte[] newData) {
        if (newData != null) {
            buffer.write(newData);
        }

        boolean done = false;
        while (!done) {
            final int index = buffer.getReaderIndex();
            final State currentState = state;
            state = actions[state.ordinal()].apply(buffer);
            done = state == currentState && buffer.getReaderIndex() == index;
        }

        return state == State.DONE;
    }
575072
protected ToolStrip buildTools() {
        ToolStrip tools = new ToolStrip();
        tools.addToolButtonRight(new ToolButton(Console.CONSTANTS.common_label_add(), new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                onAdd();
            }
        }));
        tools.addToolButtonRight(new ToolButton(Console.CONSTANTS.common_label_delete(), new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                onRemove(selectionModel.getSelectedObject().getName());
            }
        }));
        return tools;
    }
440409
private void doProcessNext()
	{
		int _position = getPosition();
		Node _current = getSource().item(_position);

		if (getActionPool().containsKey(_current.getNodeName()))
		{
			getActionPool().get(_current.getNodeName()).execute(_current, _position);
		}
		else if (getActionPool().containsKey(NODE_NAME__DEFAULT))
		{
			getActionPool().get(NODE_NAME__DEFAULT).execute(_current, _position);
		}
		// else do nothing...

		// done
		_position++;
		setPosition(_position);
	}
345500
protected function doProcess()
    {
        $links = $this->links;
        $meta = $this->meta;

        if ($this->value) {
            $links->add(
                [
                    'rel'  => 'image_src',
                    'href' => $this->value
                ]
            );
            $meta->add(
                [
                    'name' => 'image',
                    'property' => 'og:image',
                    'content' => $this->value
                ]
            );
        }

        return true;
    }
1054219
@Override
    public boolean add(ClientPresentationModel model) {
        boolean success = super.add(model);
        if (success) {
            List<ClientAttribute> attributes = model.getAttributes();
            for (ClientAttribute attribute : attributes) {
                attribute.addPropertyChangeListener(attributeChangeListener);
            }
            if (!model.isClientSideOnly()) {
                getClientConnector().send(CreatePresentationModelCommand.makeFrom(model));
            }
        }
        return success;
    }
1333636
def execute_add(args, root_dir=None):
    

    # We accept a list of strings.
    # This is done to create a better commandline experience with argparse.
    command = ' '.join(args['command'])

    # Send new instruction to daemon
    instruction = {
        'command': command,
        'path': os.getcwd()
    }
    print_command_factory('add')(instruction, root_dir)