void (@NotNull AnActionEvent e) { final Project project = e.getData(CommonDataKeys.PROJECT); if (project == null) { return; } PsiDocumentManager.getInstance(project).commitAllDocuments(); DataContext dataContext = e.getDataContext(); findShowUsages( project, dataContext, allTargets(dataContext), FindBundle.message("find.usages.ambiguous.title"), new UsageVariantHandler() { @Override public void handleTarget(@NotNull SearchTarget target) { SearchScope searchScope = FindUsagesOptions.findScopeByName( project, dataContext, FindSettings.getInstance().getDefaultScopeName() ); findUsages(toShowDialog(), project, searchScope, target); } @Override public void handlePsi(@NotNull PsiElement element) { startFindUsages(element); } } ); }