AnalysisScope (DataContext dataContext) { InspectionResultsView inspectionView = dataContext.getData(InspectionResultsView.DATA_KEY); if (inspectionView != null) { AnalysisScope scope = inspectionView.getScope(); int type = scope.getScopeType(); if (type != AnalysisScope.MODULE && type != AnalysisScope.PROJECT && scope.isValid()) { return scope; } } return null; }