Iterate through the elements of this XElement and invoke the action for each.
@param depthFirst do a depth first search?
@param action the action to invoke, non-null
6041
public void visit(boolean depthFirst, Consumer<? super XElement> action) {
        Deque<XElement> queue = new LinkedList<>();
        queue.add(this);
        while (!queue.isEmpty()) {
            XElement x = queue.removeFirst();
            action.accept(x);
            if (depthFirst) {
                ListIterator<XElement> li = x.children.listIterator(x.children.size());
                while (li.hasPrevious()) {
                    queue.addFirst(li.previous());
                }
            } else {
                for (XElement c : x.children) {
                    queue.addLast(c);
                }
            }
        }
    }
25892
protected void executeAction(Action action) {
        ProcessContext context = new ProcessContext(getProcessInstance().getKnowledgeRuntime());
        context.setNodeInstance(this);
        try {
            action.execute(context);
        } catch (Exception e) {
            String exceptionName = e.getClass().getName();
            ExceptionScopeInstance exceptionScopeInstance = (ExceptionScopeInstance)
                resolveContextInstance(ExceptionScope.EXCEPTION_SCOPE, exceptionName);
            if (exceptionScopeInstance == null) {
                throw new WorkflowRuntimeException(this, getProcessInstance(), "Unable to execute Action: " + e.getMessage(), e);
            }
            
            exceptionScopeInstance.handleException(exceptionName, e);
            cancel();
        }
    }
1192448
@Override
    @Deprecated
    public void forEachRemaining(java.util.function.Consumer<? super Triple<A, B, C>> action) {
        super.forEachRemaining(action);
    }
713297
public Stream<T> onNext(final Action1<? super T> action) {
        return new Stream<T>() {
            @Override
            public Iterator<T> iterator() {
                return new ReadOnlyIterator<T>() {

                    Iterator<T> iterator = Stream.this.iterator();

                    @Override
                    public boolean hasNext() {
                        return iterator.hasNext();
                    }

                    @Override
                    public T next() {
                        final T next = iterator.next();
                        action.call(next);
                        return next;
                    }
                };
            }
        };
    }
609210
public void invoke(Node root, Action result) throws IOException {
        doInvoke(0, root, root.isLink(), new ArrayList<>(includes), new ArrayList<>(excludes), result);
    }
626641
public void updateAction(Action action)
	{
		action.putValue(Action.NAME, myMessageProvider.getMessage(getLabelMessage(), getLocale()));
		action.putValue(Action.SHORT_DESCRIPTION, myMessageProvider.getMessage(getLabelDescription(), getLocale()));
		if (IS_NOT_EMPTY.test(getKeyboardShortcut()))
		{
			action.putValue(Action.ACCELERATOR_KEY, KeyboardRepresentationTable.getKeyStroke(getKeyboardShortcut()));
		}
		else
		{
			action.putValue(Action.ACCELERATOR_KEY, null);
		}
	}
700706
public @CheckForNull StackTraceElement getElement(@Nonnegative int depth) {
        if (depth < 0) throw new ArrayIndexOutOfBoundsException(depth);

        return elements.length > depth
                ? elements[depth]
                : null
        ;
    }
146117
@Check(CheckType.FAST)
	public void checkActionFires(SarlAction action) {
		for (final JvmTypeReference event : action.getFiredEvents()) {
			final LightweightTypeReference ref = toLightweightTypeReference(event);
			if (ref != null && !this.inheritanceHelper.isSarlEvent(ref)) {
				error(MessageFormat.format(
						Messages.SARLValidator_57,
						event.getQualifiedName(),
						Messages.SARLValidator_62,
						this.grammarAccess.getFiresKeyword()),
						event,
						null,
						ValidationMessageAcceptor.INSIGNIFICANT_INDEX,
						INVALID_FIRING_EVENT_TYPE,
						event.getSimpleName());
			}
		}
	}
1136669
public void setAction(String action) throws ApplicationException {
	action = action.toLowerCase().trim();
	if (action.equals("getall")) this.action = ACTION_GET_ALL;
	else if (action.equals("get")) this.action = ACTION_GET;
	else if (action.equals("set")) this.action = ACTION_SET;
	else if (action.equals("delete")) this.action = ACTION_DELETE;
	else throw new ApplicationException("attribute action of the tag registry has an invalid value [" + action + "], valid values are [getAll, get, set, delete]");
    }
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));
    }
511655
public void forEach(@NotNull IntConsumer action) {
        while(iterator.hasNext()) {
            action.accept(iterator.nextInt());
        }
    }
100575
public void setAction(final Action action) {
		MenuItemModel model = getOrCreateComponentModel();
		model.action = action;
		model.url = null;
	}
759549
public void forEach(BiConsumer<? super K, ? super T> action) {
        connections.forEach((key, sync) -> sync.doWithConnection(action));
    }
62282
public Object depthFirst(NodeVisitor nodeVisitor, Node root) {
        return depthFirst(nodeVisitor, Collections.singleton(root));
    }
1279410
@Override
    public void doAction(Action action) {
        switch (action) {
            case REMOVE:
                close();
                break;
            
            case HIDE:
                setVisible(false);
                break;
            
            case SHOW:
                setVisible(true);
                break;
            
            case COLLAPSE:
                setSize(Size.MINIMIZED);
                break;
            
            case EXPAND:
                setSize(Size.NORMAL);
                break;
            
            case TOP:
                moveToTop();
                break;
        }
    }
389449
public void forEach(@NotNull LongConsumer action) {
        while (iterator.hasNext()) {
            action.accept(iterator.nextLong());
        }
    }
407147
private <T extends SeleniumAction> T action(T delegate) {
        if (seleniumBrowser != null) {
            delegate.setBrowser(seleniumBrowser);
        }

        action.setDelegate(delegate);
        return delegate;
    }