From cfedbcc1be3a6aec0e05d57995ce6945e112168c Mon Sep 17 00:00:00 2001 From: Ekaterina Tuzova Date: Thu, 31 Jul 2014 18:07:37 +0400 Subject: [PATCH] fixed PY-13503 Create New Project: Expand more setting by default if there is an error in configuration --- .../newProject/actions/ProjectSpecificSettingsStep.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/ide/src/com/jetbrains/python/newProject/actions/ProjectSpecificSettingsStep.java b/python/ide/src/com/jetbrains/python/newProject/actions/ProjectSpecificSettingsStep.java index ebd0658b072c..5e60601399bb 100644 --- a/python/ide/src/com/jetbrains/python/newProject/actions/ProjectSpecificSettingsStep.java +++ b/python/ide/src/com/jetbrains/python/newProject/actions/ProjectSpecificSettingsStep.java @@ -15,6 +15,7 @@ */ package com.jetbrains.python.newProject.actions; +import com.intellij.facet.ui.ValidationResult; import com.intellij.ide.util.projectWizard.WebProjectTemplate; import com.intellij.openapi.project.DumbAware; import com.intellij.openapi.ui.VerticalFlowLayout; @@ -46,6 +47,12 @@ public class ProjectSpecificSettingsStep extends AbstractProjectSettingsStep imp 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; }