void (@NotNull Project project, @NotNull PsiClass psiClass, @NotNull AnActionEvent e) { if (DumbService.isDumb(project)) return; DataContext dataContext = DataManager.getInstance().getDataContext(e.getRequiredData(EDITOR).getContentComponent()); FeatureUsageTracker.getInstance().triggerFeatureUsed("test.discovery"); String presentableName = PsiFormatUtil.formatClass(psiClass, PsiFormatUtilBase.SHOW_NAME); DiscoveredTestsTree tree = showTree(project, dataContext, presentableName, e.getPlace()); ApplicationManager.getApplication().executeOnPooledThread(() -> { if (DumbService.isDumb(project)) return; String className = ReadAction.compute(() -> DiscoveredTestsTreeModel.getClassName(psiClass)); if (className == null) return; List<Couple<String>> classesAndMethods = new SmartList<>(Couple.of(className, null)); processTestDiscovery(project, createTreeProcessor(tree), classesAndMethods, Collections.emptyList()); EdtInvocationManager.getInstance().invokeLater(() -> tree.setPaintBusy(false)); }); }