use of com.intellij.ide.util.projectWizard.WebProjectTemplate in project intellij-community by JetBrains.
the class ProjectSpecificSettingsStep method createAdvancedSettings.
@Override
@Nullable
protected JPanel createAdvancedSettings() {
JComponent advancedSettings = null;
if (myProjectGenerator instanceof PythonProjectGenerator) {
advancedSettings = ((PythonProjectGenerator) myProjectGenerator).getSettingsPanel(myProjectDirectory);
} else if (myProjectGenerator instanceof WebProjectTemplate) {
advancedSettings = ((WebProjectTemplate) myProjectGenerator).getPeer().getComponent();
}
if (advancedSettings != null) {
final JPanel jPanel = new JPanel(new VerticalFlowLayout());
final HideableDecorator deco = new HideableDecorator(jPanel, "Mor&e Settings", false);
boolean isValid = checkValid();
deco.setOn(!isValid);
if (myProjectGenerator instanceof PythonProjectGenerator && !deco.isExpanded()) {
final ValidationResult result = ((PythonProjectGenerator) myProjectGenerator).warningValidation(getSdk());
deco.setOn(!result.isOk());
}
deco.setContentComponent(advancedSettings);
return jPanel;
}
return null;
}
use of com.intellij.ide.util.projectWizard.WebProjectTemplate 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