mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 06:21:16 +07:00
added option to skip running task file on check action
This commit is contained in:
@@ -248,6 +248,13 @@ def check_samples(samples=()):
|
||||
passed()
|
||||
|
||||
|
||||
def do_not_run_on_check():
|
||||
"""
|
||||
Do not execute task file on check
|
||||
"""
|
||||
print("#educational_plugin DO_NOT_RUN_ON_CHECK")
|
||||
|
||||
|
||||
def run_common_tests(error_text="Please, reload file and try again"):
|
||||
test_is_initial_text()
|
||||
test_is_not_empty()
|
||||
|
||||
-14
@@ -1,7 +1,6 @@
|
||||
package com.jetbrains.edu.learning;
|
||||
|
||||
import com.intellij.execution.ExecutionException;
|
||||
import com.intellij.openapi.actionSystem.ActionManager;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.command.CommandProcessor;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
@@ -11,7 +10,6 @@ import com.intellij.openapi.ui.MessageType;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.wm.IdeFocusManager;
|
||||
import com.jetbrains.edu.learning.actions.StudyCheckAction;
|
||||
import com.jetbrains.edu.learning.actions.StudyRunAction;
|
||||
import com.jetbrains.edu.learning.checker.StudyCheckTask;
|
||||
import com.jetbrains.edu.learning.checker.StudyCheckUtils;
|
||||
import com.jetbrains.edu.learning.checker.StudyTestRunner;
|
||||
@@ -44,9 +42,6 @@ public class PyStudyCheckAction extends StudyCheckAction {
|
||||
}
|
||||
if (StudyCheckUtils.hasBackgroundProcesses(project)) return;
|
||||
|
||||
final Course course = StudyTaskManager.getInstance(project).getCourse();
|
||||
if (course != null && !course.isAdaptive() && !runTask(project)) return;
|
||||
|
||||
final Task task = studyState.getTask();
|
||||
final VirtualFile taskDir = studyState.getTaskDir();
|
||||
StudyCheckUtils.flushWindows(task, taskDir);
|
||||
@@ -77,15 +72,6 @@ public class PyStudyCheckAction extends StudyCheckAction {
|
||||
}));
|
||||
}
|
||||
|
||||
private static boolean runTask(@NotNull Project project) {
|
||||
final StudyRunAction runAction = (StudyRunAction)ActionManager.getInstance().getAction(StudyRunAction.ACTION_ID);
|
||||
if (runAction == null) {
|
||||
return false;
|
||||
}
|
||||
runAction.run(project);
|
||||
return true;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private StudyCheckTask getCheckTask(@NotNull final Project project,
|
||||
final StudyState studyState,
|
||||
|
||||
Reference in New Issue
Block a user