void (@NotNull DefaultActionGroup group, @NotNull Function<? super Executor, ? extends ExecutorRegistryImpl.ExecutorAction> actionCreator, @NotNull Function<? super Executor, Boolean> executorFilter) { for (Executor executor : Executor.EXECUTOR_EXTENSION_NAME.getExtensionList()) { if (executor instanceof ExecutorGroup) { for (Executor childExecutor : ((ExecutorGroup<?>)executor).childExecutors()) { if (executorFilter.apply(childExecutor)) { group.addAction(actionCreator.apply(childExecutor)); } } } else { if (executorFilter.apply(executor)) { group.addAction(actionCreator.apply(executor)); } } } }