void (@NotNull AnActionEvent e) { Project project = e.getProject(); if (project == null) return; DataContext dataContext = e.getDataContext(); AnalysisScope scope = getInspectionScope(dataContext, project); if (scope == null) return; String title = getDialogTitle(); String scopeTitle = CodeInsightBundle.message("analysis.scope.title", myAnalysisNoun.get()); Module module = getModuleFromContext(dataContext); boolean rememberScope = ActionPlaces.isMainMenuOrActionSearch(e.getPlace()); AnalysisUIOptions uiOptions = AnalysisUIOptions.getInstance(project); PsiElement element = CommonDataKeys.PSI_ELEMENT.getData(dataContext); List<ModelScopeItem> items = BaseAnalysisActionDialog.standardItems(project, scope, module, element); BaseAnalysisActionDialog dlg = getAnalysisDialog(project, title, scopeTitle, rememberScope, uiOptions, items); if (!dlg.showAndGet()) { canceled(); return; } int oldScopeType = uiOptions.SCOPE_TYPE; scope = dlg.getScope(scope); if (!rememberScope) { uiOptions.SCOPE_TYPE = oldScopeType; } uiOptions.ANALYZE_TEST_SOURCES = dlg.isInspectTestSources(); FileDocumentManager.getInstance().saveAllDocuments(); analyze(project, scope); }