コード例 #1
0
 public static void runConfiguration(
     @NotNull RunnerAndConfigurationSettings configuration, @NotNull Executor executor) {
   ExecutionEnvironmentBuilder builder = createEnvironment(executor, configuration);
   if (builder != null) {
     ExecutionManager.getInstance(configuration.getConfiguration().getProject())
         .restartRunProfile(builder.activeTarget().build());
   }
 }
コード例 #2
0
 @Nullable
 public static ExecutionEnvironmentBuilder createEnvironment(
     @NotNull Executor executor, @NotNull RunnerAndConfigurationSettings settings) {
   try {
     return ExecutionEnvironmentBuilder.create(executor, settings);
   } catch (ExecutionException e) {
     handleExecutionError(
         settings.getConfiguration().getProject(),
         executor.getToolWindowId(),
         settings.getConfiguration().getName(),
         e);
     return null;
   }
 }