String (@NotNull final Project project) { final Sdk projectJdk = getProjectSdk(project); if (projectJdk != null) { return projectJdk.getName(); } final String projectJdkName = ProjectRootManager.getInstance(project).getProjectSdkName(); final ProjectSdksModel projectJdksModel = ProjectStructureConfigurable.getInstance(project).getProjectJdksModel(); return projectJdkName != null && projectJdksModel.findSdk(projectJdkName) == null ? projectJdkName : null; }