void (@NotNull Project project) { if (ProjectRootManager.getInstance(project).getProjectSdk() == null) { Sdk projectSdk = suggestProjectSdk(project); if (projectSdk == null) return; ApplicationManager.getApplication().runWriteAction(() -> { JavaSdkUtil.applyJdkToProject(project, projectSdk); }); } }