private static @NotNull UsageData findUsages(@NotNull PsiMember constructorOrClass) {
    List<PsiNewExpression> newUsages = new ArrayList<>();
    List<PsiElement> otherUsages = new ArrayList<>();

    for (PsiReference reference : ReferencesSearch.search(constructorOrClass, constructorOrClass.getUseScope(), false)) {
      PsiElement element = reference.getElement();

      if (element.getParent() instanceof PsiNewExpression newExpression) {
        newUsages.add(newExpression);
      }
      else if (element.getParent() instanceof PsiAnonymousClass || 
               "super".equals(element.getText()) || "this".equals(element.getText()) ||
               element instanceof PsiMethod method && method.isConstructor() ||
               element instanceof PsiClass) {
        otherUsages.add(element);
      }
    }
    return new UsageData(newUsages, otherUsages);
  }
private static @NotNull UsageData findUsages(@NotNull PsiMember constructorOrClass)