mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
StudyTaskManager fixed: project service instance shouldn't be obtained as a module service
This commit is contained in:
+2
-10
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user