public static void handleExecutionError( @NotNull ExecutionEnvironment environment, @NotNull ExecutionException e) { handleExecutionError( environment.getProject(), environment.getExecutor().getToolWindowId(), environment.getRunProfile().getName(), e); }
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; }
@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); } }