public static UsageTarget @NotNull [] findUsageTargets(@NotNull PsiElement psiElement) {
    List<UsageTarget> result = new ArrayList<>();
    for (UsageTargetProvider provider : getProviders(psiElement.getProject())) {
      UsageTarget[] targets = provider.getTargets(psiElement);
      if (targets != null) Collections.addAll(result, targets);
    }
    return result.isEmpty() ? UsageTarget.EMPTY_ARRAY : result.toArray(UsageTarget.EMPTY_ARRAY);
  }
public static UsageTarget @NotNull [] findUsageTargets(@NotNull PsiElement psiElement)