void (@NotNull Project project) { ApplicationManager.getApplication().invokeAndWait(() -> { if (!project.isDisposed()) { if (Boolean.getBoolean("inspect.save.project.settings")) { forPoorJavaClientOnlySaveProjectIndEdtDoNotUseThisMethod(project, true); } ProjectManagerEx.getInstanceEx().forceCloseProject(project); } }); }