private static boolean addFieldsUsages(@NotNull PsiClass aClass,
                                         @NotNull PsiManager manager,
                                         @NotNull JavaClassFindUsagesOptions options,
                                         @NotNull Processor<? super UsageInfo> processor) {
    if (options.isIncludeInherited) {
      PsiField[] fields = ReadAction.compute(() -> aClass.getAllFields());
      for (int i = 0; i < fields.length; i++) {
        PsiField field = fields[i];
        // filter hidden fields
        int finalI = i;
        PsiClass fieldClass =
        ReadAction.compute(() -> {
          for (int j = 0; j < finalI; j++) {
            if (Comparing.strEqual(field.getName(), fields[j].getName())) return null;
          }
          return field.getContainingClass();
        });
        if (fieldClass == null) continue;
        boolean equivalent = ReadAction.compute(() -> manager.areElementsEquivalent(fieldClass, aClass));
        if (equivalent) {
          if (!addElementUsages(fields[i], options, processor)) return false;
        }
        else {
          boolean success = ReferencesSearch.search(new ReferencesSearch.SearchParameters(field, options.searchScope, false, options.fastTrack)).forEach(
            new ReadActionProcessor<>() {
              @Override
              public boolean processInReadAction(PsiReference reference) {
                return addResultFromReference(reference, fieldClass, manager, aClass, options, processor);
              }
            });
          if (!success) return false;
        }
      }
    }
    else {
      PsiField[] fields = ReadAction.compute(() -> aClass.getFields());
      for (PsiField field : fields) {
        if (!addElementUsages(field, options, processor)) return false;
      }
    }
    return true;
  }
private static boolean addFieldsUsages(@NotNull PsiClass aClass,
                                         @NotNull PsiManager manager,
                                         @NotNull JavaClassFindUsagesOptions options,
                                         @NotNull Processor<? super UsageInfo> processor)