Executor (@NotNull String executorId) { // even IJ Ultimate with all plugins has ~7 executors - linear search is ok here for (Executor executor : Executor.EXECUTOR_EXTENSION_NAME.getExtensionList()) { if (executorId.equals(executor.getId())) { return executor; } else if (executor instanceof ExecutorGroup<?> && executorId.startsWith(executor.getId())) { for (Executor child : ((ExecutorGroup<?>)executor).childExecutors()) { if (executorId.equals(child.getId())) { return child; } } } } return null; }