mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user