save files before check
[idea/community.git] / python / educational-core / student / src / com / jetbrains / edu / learning / actions / StudyCheckAction.java
index 3abc02f7c53337c240605b5f66c1f1a40b347b66..04d692333e01ba086fde2c7f8ace9e8d70e6dc55 100644 (file)
@@ -4,6 +4,7 @@ import com.intellij.openapi.actionSystem.AnActionEvent;
 import com.intellij.openapi.actionSystem.KeyboardShortcut;
 import com.intellij.openapi.actionSystem.Presentation;
 import com.intellij.openapi.extensions.Extensions;
+import com.intellij.openapi.fileEditor.FileDocumentManager;
 import com.intellij.openapi.keymap.KeymapUtil;
 import com.intellij.openapi.project.DumbService;
 import com.intellij.openapi.project.Project;
@@ -38,6 +39,7 @@ public abstract class StudyCheckAction extends StudyActionWithShortcut {
       StudyCheckUtils.showTestResultPopUp("Checking is not available while indexing is in progress", MessageType.WARNING.getPopupBackground(), project);
       return;
     }
+    FileDocumentManager.getInstance().saveAllDocuments();
     for (StudyActionListener listener : Extensions.getExtensions(StudyActionListener.EP_NAME)) {
       listener.beforeCheck(e);
     }