mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed EDU-308 Do not close Run Toolwindow on cancelling task check
This commit is contained in:
@@ -161,7 +161,7 @@ public class StudyCheckAction extends DumbAwareAction {
|
||||
return;
|
||||
}
|
||||
selectedEditor.getCheckButton().setEnabled(false);
|
||||
ProgressManager.getInstance().run(getCheckTask(studyState, runAction, testRunner, testProcess, project, selectedEditor));
|
||||
ProgressManager.getInstance().run(getCheckTask(studyState, testRunner, testProcess, project, selectedEditor));
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -170,7 +170,6 @@ public class StudyCheckAction extends DumbAwareAction {
|
||||
|
||||
@NotNull
|
||||
private com.intellij.openapi.progress.Task.Backgroundable getCheckTask(final StudyState studyState,
|
||||
final StudyRunAction runAction,
|
||||
final StudyTestRunner testRunner,
|
||||
final Process testProcess,
|
||||
@NotNull final Project project,
|
||||
@@ -200,7 +199,6 @@ public class StudyCheckAction extends DumbAwareAction {
|
||||
final CapturingProcessHandler handler = new CapturingProcessHandler(testProcess);
|
||||
final ProcessOutput output = handler.runProcessWithProgressIndicator(indicator);
|
||||
if (indicator.isCanceled()) {
|
||||
runAction.cancel(project);
|
||||
ApplicationManager.getApplication().invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.intellij.execution.configurations.GeneralCommandLine;
|
||||
import com.intellij.execution.process.OSProcessHandler;
|
||||
import com.intellij.execution.process.ProcessHandler;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.fileEditor.FileDocumentManager;
|
||||
@@ -15,9 +14,6 @@ import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.wm.ToolWindow;
|
||||
import com.intellij.openapi.wm.ToolWindowId;
|
||||
import com.intellij.openapi.wm.ToolWindowManager;
|
||||
import com.jetbrains.python.edu.StudyResourceManger;
|
||||
import com.jetbrains.python.edu.StudyTaskManager;
|
||||
import com.jetbrains.python.edu.StudyUtils;
|
||||
@@ -86,19 +82,6 @@ public class StudyRunAction extends DumbAwareAction {
|
||||
}
|
||||
}
|
||||
|
||||
public void cancel(final Project project) {
|
||||
myHandler.destroyProcess();
|
||||
ApplicationManager.getApplication().invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
ToolWindow runToolWindow = ToolWindowManager.getInstance(project).getToolWindow(ToolWindowId.RUN);
|
||||
if (runToolWindow != null) {
|
||||
runToolWindow.hide(null);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void actionPerformed(@NotNull AnActionEvent e) {
|
||||
Project project = e.getProject();
|
||||
if (project == null) {
|
||||
|
||||
Reference in New Issue
Block a user