EDU-406 Assertion failed in Study Editor
authorliana.bakradze <liana.bakradze@jetbrains.com>
Tue, 25 Aug 2015 14:38:36 +0000 (17:38 +0300)
committerliana.bakradze <liana.bakradze@jetbrains.com>
Tue, 25 Aug 2015 14:40:45 +0000 (17:40 +0300)
python/educational/interactive-learning/src/com/jetbrains/edu/learning/editor/StudyFileEditorProvider.java

index 1c9baab9576907bfa0d0900654b6a797ac5a520e..77e6f10693f8bbac0222523bcb79e970840c8a8e 100644 (file)
@@ -13,11 +13,6 @@ import com.jetbrains.edu.learning.StudyUtils;
 import org.jdom.Element;
 import org.jetbrains.annotations.NotNull;
 
-/**
- * User: lia
- * Date: 10.05.14
- * Time: 12:45
- */
 class StudyFileEditorProvider implements FileEditorProvider, DumbAware {
   static final private String EDITOR_TYPE_ID = "StudyEditor";
   final private FileEditorProvider defaultTextEditorProvider = TextEditorProvider.getInstance();
@@ -25,7 +20,7 @@ class StudyFileEditorProvider implements FileEditorProvider, DumbAware {
   @Override
   public boolean accept(@NotNull Project project, @NotNull VirtualFile file) {
     TaskFile taskFile = StudyUtils.getTaskFile(project, file);
-    return taskFile != null && !taskFile.isUserCreated();
+    return taskFile != null && !taskFile.isUserCreated() && TextEditorProvider.isTextFile(file);
   }
 
   @NotNull