commit changes to pattern document before study check action
[idea/community.git] / python / educational-core / student / src / com / jetbrains / edu / learning / actions / StudyCheckAction.java
index 5c42608382f12aba893c2ef5c9bd5d04f7832e64..a3b0295dbe4139ac5ce866f520dbac0d00b44138 100644 (file)
@@ -3,11 +3,13 @@ package com.jetbrains.edu.learning.actions;
 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.keymap.KeymapUtil;
 import com.intellij.openapi.project.DumbService;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.ui.MessageType;
 import com.intellij.openapi.util.Ref;
+import com.jetbrains.edu.learning.StudyCheckActionListener;
 import com.jetbrains.edu.learning.StudyUtils;
 import com.jetbrains.edu.learning.checker.StudyCheckUtils;
 import icons.InteractiveLearningIcons;
@@ -36,6 +38,9 @@ public abstract class StudyCheckAction extends StudyActionWithShortcut {
       StudyCheckUtils.showTestResultPopUp("Checking is not available while indexing is in progress", MessageType.WARNING.getPopupBackground(), project);
       return;
     }
+    for (StudyCheckActionListener listener : Extensions.getExtensions(StudyCheckActionListener.EP_NAME)) {
+      listener.beforeCheck(e);
+    }
     check(project);
   }