void (@NotNull AnActionEvent e) { Project project = e.getProject(); if (project == null) return; Module[] modules = e.getData(LangDataKeys.MODULE_CONTEXT_ARRAY); if (modules == null) { PsiElement element = e.getData(CommonDataKeys.PSI_FILE); Module module = element != null ? ModuleUtilCore.findModuleForPsiElement(element) : null; if (module != null && ModuleManager.getInstance(project).getModules().length > 1) { MyModuleOrProjectScope dlg = new MyModuleOrProjectScope(module.getName()); if (!dlg.showAndGet()) { return; } if (!dlg.useProjectScope()) { modules = new Module[]{module}; } } } ModulesDependenciesPanel panel = new ModulesDependenciesPanel(project, modules); AnalysisScope scope = modules != null ? new AnalysisScope(modules) : new AnalysisScope(project); Content content = ContentFactory.getInstance().createContent(panel, scope.getDisplayName(), false); content.setHelpId(ModulesDependenciesPanel.HELP_ID); content.setDisposer(panel); panel.setContent(content); DependenciesAnalyzeManager.getInstance(project).addContent(content); }