void (@NotNull ProjectSdksModel sdksModel, @NotNull Project project, @Nullable Sdk projectSdk) { sdksModel.reset(project); deduplicateSdkNames(sdksModel); if (projectSdk == null) { projectSdk = sdksModel.getProjectSdk(); // Find real sdk // see ProjectSdksModel#getProjectSdk for details projectSdk = sdksModel.findSdk(projectSdk); } if (projectSdk != null) { // resolves executable JDK // e.g: for Android projects projectSdk = ExternalSystemJdkUtil.resolveDependentJdk(projectSdk); // Find editable sdk // see ProjectSdksModel#getProjectSdk for details projectSdk = sdksModel.findSdk(projectSdk.getName()); } sdksModel.setProjectSdk(projectSdk); }