mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix get courses in show course preview
This commit is contained in:
committed by
Ekaterina Tuzova
parent
2168b64066
commit
5bc23e38bc
+2
-2
@@ -10,8 +10,8 @@ import com.jetbrains.edu.learning.PyStudyDirectoryProjectGenerator;
|
||||
import com.jetbrains.edu.learning.StudyTaskManager;
|
||||
import com.jetbrains.edu.learning.core.EduNames;
|
||||
import com.jetbrains.edu.learning.courseFormat.Course;
|
||||
import com.jetbrains.edu.learning.courseGeneration.StudyProjectGenerator;
|
||||
import com.jetbrains.edu.learning.courseFormat.CourseInfo;
|
||||
import com.jetbrains.edu.learning.courseGeneration.StudyProjectGenerator;
|
||||
import com.jetbrains.python.newProject.steps.PyCharmNewProjectStep;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -25,7 +25,7 @@ class CreateFromArchiveProjectStep extends PyCharmNewProjectStep {
|
||||
|
||||
private final Project myProject;
|
||||
private final Module myModule;
|
||||
private PyStudyDirectoryProjectGenerator myGenerator = new PyStudyDirectoryProjectGenerator();
|
||||
private PyStudyDirectoryProjectGenerator myGenerator = new PyStudyDirectoryProjectGenerator(true);
|
||||
|
||||
public MyCustomization(Project project,
|
||||
Module module) {
|
||||
|
||||
+5
-1
@@ -60,6 +60,10 @@ public class PyStudyDirectoryProjectGenerator extends PythonProjectGenerator<PyN
|
||||
private StudyNewProjectPanel mySettingsPanel;
|
||||
|
||||
public PyStudyDirectoryProjectGenerator() {
|
||||
this(false);
|
||||
}
|
||||
|
||||
public PyStudyDirectoryProjectGenerator(boolean isLocal) {
|
||||
myGenerator = new StudyProjectGenerator();
|
||||
myGenerator.addSettingsStateListener(new StudyProjectGenerator.SettingsListener() {
|
||||
@Override
|
||||
@@ -68,7 +72,7 @@ public class PyStudyDirectoryProjectGenerator extends PythonProjectGenerator<PyN
|
||||
}
|
||||
});
|
||||
|
||||
mySettingsPanel = new StudyNewProjectPanel(myGenerator);
|
||||
mySettingsPanel = new StudyNewProjectPanel(myGenerator, isLocal);
|
||||
mySettingsPanel.registerValidators(new FacetValidatorsManager() {
|
||||
public void registerValidator(FacetEditorValidator validator, JComponent... componentsToWatch) {
|
||||
throw new UnsupportedOperationException();
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ public class PyStudyIntroductionCourseAction extends AnAction {
|
||||
ProjectUtil.openProject(projectDir.getPath(), null, false);
|
||||
}
|
||||
else {
|
||||
final PyStudyDirectoryProjectGenerator generator = new PyStudyDirectoryProjectGenerator();
|
||||
final PyStudyDirectoryProjectGenerator generator = new PyStudyDirectoryProjectGenerator(true);
|
||||
final EduPluginConfigurator configurator = EduPluginConfigurator.INSTANCE.forLanguage(PythonLanguage.getInstance());
|
||||
final String bundledCoursePath = configurator.getBundledCoursePath();
|
||||
CourseInfo introCourse = generator.getGenerator().getCourseInfo(bundledCoursePath);
|
||||
|
||||
Reference in New Issue
Block a user