StudyTaskManager fixed: project service instance shouldn't be obtained as a module...
authornik <Nikolay.Chashnikov@jetbrains.com>
Thu, 11 Jun 2015 15:34:51 +0000 (18:34 +0300)
committernik <Nikolay.Chashnikov@jetbrains.com>
Thu, 11 Jun 2015 15:39:27 +0000 (18:39 +0300)
python/educational/interactive-learning/src/com/jetbrains/edu/learning/StudyTaskManager.java

index 43de59f09bad9b3a4d55345a3286eb459de5ba96..1cbd1cff6f901f6b251fee07b0f5e3a99bde530c 100644 (file)
@@ -1,12 +1,6 @@
 package com.jetbrains.edu.learning;
 
-import com.intellij.openapi.components.PersistentStateComponent;
-import com.intellij.openapi.components.State;
-import com.intellij.openapi.components.Storage;
-import com.intellij.openapi.components.StorageScheme;
-import com.intellij.openapi.module.Module;
-import com.intellij.openapi.module.ModuleManager;
-import com.intellij.openapi.module.ModuleServiceManager;
+import com.intellij.openapi.components.*;
 import com.intellij.openapi.project.DumbAware;
 import com.intellij.openapi.project.Project;
 import com.intellij.ui.JBColor;
@@ -176,8 +170,6 @@ public class StudyTaskManager implements PersistentStateComponent<StudyTaskManag
   }
 
   public static StudyTaskManager getInstance(@NotNull final Project project) {
-    final Module module = ModuleManager.getInstance(project).getModules()[0];
-    return ModuleServiceManager.getService(module, StudyTaskManager.class);
+    return ServiceManager.getService(project, StudyTaskManager.class);
   }
-
 }