private static Collection<UsageInfo> findUsages(final @NotNull PsiElement element) {
    final FindUsagesHandlerBase handler = createFindUsageHandler(element);
    if (handler == null) {
      return new ArrayList<>();
    }
    final CommonProcessors.CollectProcessor<UsageInfo> processor = new CommonProcessors.CollectProcessor<>();
    final PsiElement[] psiElements = ArrayUtil.mergeArrays(handler.getPrimaryElements(), handler.getSecondaryElements());
    final FindUsagesOptions options = handler.getFindUsagesOptions(null);
    for (PsiElement psiElement : psiElements) {
      handler.processElementUsages(psiElement, processor, options);
    }
    return processor.getResults();
  }
private static Collection<UsageInfo> findUsages(final @NotNull PsiElement element)