public static void handleExecutionError(
     @NotNull ExecutionEnvironment environment, @NotNull ExecutionException e) {
   handleExecutionError(
       environment.getProject(),
       environment.getExecutor().getToolWindowId(),
       environment.getRunProfile().getName(),
       e);
 }
예제 #2
0
 boolean isEnabled() {
   ProcessHandler processHandler = myDescriptor.getProcessHandler();
   boolean isTerminating = processHandler != null && processHandler.isProcessTerminating();
   boolean isStarting =
       ExecutorRegistry.getInstance()
           .isStarting(myEnvironment.getProject(), myExecutor.getId(), myRunner.getRunnerId());
   return !isStarting && !isTerminating;
 }
예제 #3
0
 @Override
 public void actionPerformed(final AnActionEvent e) {
   Project project = myEnvironment.getProject();
   if (project == null) return;
   if (myProcessHandler != null) {
     ExecutionManager.getInstance(project)
         .restartRunProfile(
             project,
             myExecutor,
             myEnvironment.getExecutionTarget(),
             myEnvironment.getRunnerAndConfigurationSettings(),
             myProcessHandler);
   } else {
     ExecutionManager.getInstance(project)
         .restartRunProfile(
             project,
             myExecutor,
             myEnvironment.getExecutionTarget(),
             myEnvironment.getRunnerAndConfigurationSettings(),
             myDescriptor);
   }
 }
 public static void restart(@NotNull ExecutionEnvironment environment) {
   if (!ExecutorRegistry.getInstance().isStarting(environment)) {
     ExecutionManager.getInstance(environment.getProject()).restartRunProfile(environment);
   }
 }