}
updatePlaceholderTexts(project, document, taskFile, fromSubtaskIndex, toSubtaskIndex);
EditorNotifications.getInstance(project).updateNotifications(virtualFile);
- if (StudyUtils.isStudyProject(project)) {
+ if (StudyUtils.isStudentProject(project)) {
WolfTheProblemSolver.getInstance(project).clearProblems(virtualFile);
taskFile.setHighlightErrors(false);
}
@NotNull
private static Result handleTyping(Project project, Editor editor, PsiFile file) {
- if (!StudyUtils.isStudyProject(project)) {
+ if (!StudyUtils.isStudentProject(project)) {
return Result.CONTINUE;
}
TaskFile taskFile = StudyUtils.getTaskFile(project, file.getVirtualFile());
return StudyTaskManager.getInstance(project).getCourse() != null;
}
+ public static boolean isStudentProject(@NotNull Project project) {
+ Course course = StudyTaskManager.getInstance(project).getCourse();
+ if (course == null) {
+ return false;
+ }
+ return EduNames.STUDY.equals(course.getCourseMode());
+ }
+
@Nullable
public static Project getStudyProject() {
Project studyProject = null;