void (@NotNull Project project, @NotNull Path projectPath, @NotNull GlobalInspectionContextEx context, @NotNull AnalysisScope scope, @NotNull Path resultsDataPath, @NotNull List<? super Path> inspectionsResults) { ProgressManager.getInstance().runProcess(() -> { configureProject(projectPath, project, scope); if (!GlobalInspectionContextUtil.canRunInspections(project, false, () -> { })) { onFailure(InspectionsBundle.message("inspection.application.cannot.configure.project.to.run.inspections")); } context.launchInspectionsOffline(scope, resultsDataPath, myRunGlobalToolsOnly, inspectionsResults); reportMessage(1, "\n" + InspectionsBundle.message("inspection.capitalized.done") + "\n"); if (!myErrorCodeRequired) { closeProject(project); } }, createProgressIndicator()); }