Collection<UsageInfo> (@NotNull ProgressIndicator indicator) { return runInEdtAndGet(() -> { FindUsagesManager findUsagesManager = ((FindManagerImpl)FindManager.getInstance(element.getProject())).getFindUsagesManager(); FindUsagesHandler handler = findUsagesManager.getFindUsagesHandler(element, false); assertNotNull(handler); final FindUsagesOptions options = handler.getFindUsagesOptions(); final CommonProcessors.CollectProcessor<UsageInfo> processor = new CommonProcessors.CollectProcessor<>(); for (PsiElement element : handler.getPrimaryElements()) { handler.processElementUsages(element, processor, options); } for (PsiElement element : handler.getSecondaryElements()) { handler.processElementUsages(element, processor, options); } return processor.getResults(); }); }