AnalysisScope (final DataContext dataContext) { final Project project = CommonDataKeys.PROJECT.getData(dataContext); if (project == null) return null; AnalysisScope scope = getInspectionScopeImpl(dataContext); return scope != null && scope.getScopeType() != AnalysisScope.INVALID ? scope : null; }