use of org.stepik.api.objects.lessons.CompoundUnitLesson in project intellij-plugins by StepicOrg.
the class StudyNodeFactory method createTree.
public static StudyNode createTree(@NotNull Project project, @NotNull StepikApiClient stepikApiClient, @NotNull StudyObject data) {
StudyNode root = null;
if (data instanceof Course) {
root = new CourseNode(project, stepikApiClient, (Course) data);
} else if (data instanceof Section) {
root = new SectionNode(project, stepikApiClient, (Section) data);
} else if (data instanceof Lesson) {
CompoundUnitLesson compoundData = new CompoundUnitLesson(null, (Lesson) data);
root = new LessonNode(project, stepikApiClient, compoundData);
} else if (data instanceof CompoundUnitLesson) {
root = new LessonNode(project, stepikApiClient, (CompoundUnitLesson) data);
} else if (data instanceof Step) {
root = new StepNode(project, stepikApiClient, (Step) data);
}
return root;
}
Aggregations