use of com.jetbrains.edu.learning.courseFormat.CourseInfo in project intellij-community by JetBrains.
the class PyStudyIntroductionCourseAction method actionPerformed.
@Override
public void actionPerformed(@NotNull AnActionEvent e) {
final File projectDir = new File(ProjectUtil.getBaseDir(), INTRODUCTION_FOLDER);
if (projectDir.exists()) {
ProjectUtil.openProject(projectDir.getPath(), null, false);
} else {
final PyStudyDirectoryProjectGenerator generator = new PyStudyDirectoryProjectGenerator();
CourseInfo introCourse = StudyProjectGenerator.getBundledIntro();
if (introCourse == null) {
return;
}
final PythonGenerateProjectCallback callback = new PythonGenerateProjectCallback();
final ProjectSpecificSettingsStep step = new ProjectSpecificSettingsStep(generator, callback);
// initialize panel to set location
step.createPanel();
step.setLocation(projectDir.toString());
generator.setSelectedCourse(introCourse);
callback.consume(step);
}
}
Aggregations