StudyTaskManager fixed: project service instance shouldn't be obtained as a module service

This commit is contained in:
nik
2015-06-11 18:39:27 +03:00
parent 2b3e2792e7
commit 000b1a7647
@@ -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);
}
}