private void runInspections(Project project, AnalysisScope scope) {
        scope.setSearchInLibraries(false);

        FileDocumentManager.getInstance().saveAllDocuments();

        GlobalInspectionContextImpl inspectionContext = getGlobalInspectionContext(project);

        InspectionManagerEx managerEx = (InspectionManagerEx) InspectionManager.getInstance(project);
        myExternalProfile = createMigrationProfile(managerEx, null, null);

        inspectionContext.setExternalProfile(myExternalProfile);
        inspectionContext.setCurrentScope(scope);
        inspectionContext.doInspections(scope);
    }
private void runInspections(Project project, AnalysisScope scope)