use of com.jetbrains.python.newProject.PythonProjectGenerator in project intellij-community by JetBrains.
the class PythonGenerateProjectCallback method computeProjectSettings.
public static Object computeProjectSettings(DirectoryProjectGenerator<?> generator, final ProjectSpecificSettingsStep settings) {
Object projectSettings = null;
if (generator instanceof PythonProjectGenerator) {
final PythonProjectGenerator<?> projectGenerator = (PythonProjectGenerator<?>) generator;
projectSettings = projectGenerator.getProjectSettings();
} else if (generator instanceof WebProjectTemplate) {
projectSettings = ((WebProjectTemplate<?>) generator).getPeer().getSettings();
}
if (projectSettings instanceof PyNewProjectSettings) {
final PyNewProjectSettings newProjectSettings = (PyNewProjectSettings) projectSettings;
newProjectSettings.setSdk(settings.getSdk());
newProjectSettings.setInstallFramework(settings.installFramework());
newProjectSettings.setRemotePath(settings.getRemotePath());
}
return projectSettings;
}
Aggregations