fixed PY-12257 IOOBE: CreateVirtualEnvDialog.setupDialog

This commit is contained in:
Ekaterina Tuzova
2014-02-27 15:51:34 +04:00
parent 2533839d28
commit daada4ccee
@@ -116,13 +116,13 @@ public class CreateVirtualEnvDialog extends IdeaDialog {
myProject = project;
init();
setTitle("Create Virtual Environment");
Iterables.removeIf(allSdks, new Predicate<Sdk>() {
@Override
public boolean apply(Sdk s) {
return PythonSdkType.isInvalid(s) || PythonSdkType.isVirtualEnv(s) || RemoteSdkCredentialsHolder.isRemoteSdk(s.getHomePath());
}
});
if (suggestedBaseSdk == null && allSdks.size() > 0) {
Iterables.removeIf(allSdks, new Predicate<Sdk>() {
@Override
public boolean apply(Sdk s) {
return PythonSdkType.isInvalid(s) || PythonSdkType.isVirtualEnv(s) || RemoteSdkCredentialsHolder.isRemoteSdk(s.getHomePath());
}
});
List<Sdk> sortedSdks = new ArrayList<Sdk>(allSdks);
Collections.sort(sortedSdks, new PreferredSdkComparator());
suggestedBaseSdk = sortedSdks.get(0);