ExecutionEnvironment (@NotNull final AbstractRerunFailedTestsAction runAction) { final MyRunProfile profile = runAction.getRunProfile(new ExecutionEnvironment()); if (profile == null) { return null; } final Ref<ExecutionEnvironment> stateRef = new Ref<>(); EdtTestUtil.runInEdtAndWait((() -> stateRef.set(ExecutionEnvironmentBuilder.create(DefaultRunExecutor.getRunExecutorInstance(), profile).build()))); return stateRef.get(); }