IDEA-116593 improve choosing of Android and Java SDKs when creating new android-gradle project/module:

choose only Android SDK location (if we don't know it) on first step, not build target;
choose Java SDK (if there is no any) separately, set it as project sdk and as internal jdk for newly created android sdk entities
This commit is contained in:
Eugene Kudelevsky
2013-12-16 16:37:58 +04:00
parent 58aabd676e
commit 2bf19b493b
@@ -31,6 +31,7 @@ import com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectSdksModel;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.util.Condition;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import java.awt.*;
@@ -102,10 +103,15 @@ public class SdkSettingsStep extends ModuleWizardStep {
JPanel jdkPanel = new JPanel(new BorderLayout(4, 0));
jdkPanel.add(myJdkComboBox);
jdkPanel.add(button, BorderLayout.EAST);
settingsStep.addSettingsField((project == null ? "Project" : "Module") + " \u001BSDK:", jdkPanel);
settingsStep.addSettingsField(getSdkFieldLabel(project), jdkPanel);
}
@NotNull
protected String getSdkFieldLabel(@Nullable Project project) {
return (project == null ? "Project" : "Module") + " \u001BSDK:";
}
@Override
public JComponent getComponent() {
return null;