private static PsiElementClassMember @Nullable [] getTargetElements(PsiFile file, Editor editor) {
    return DumbService.getInstance(file.getProject()).computeWithAlternativeResolveEnabled(() -> {
      int offset = editor.getCaretModel().getOffset();
      PsiElement element = file.findElementAt(offset);
      if (element == null) return null;
      final PsiClass targetClass = PsiTreeUtil.getParentOfType(element, PsiClass.class);
      PsiClass aClass = targetClass;
      if (aClass == null) return null;

      List<PsiElementClassMember> result = new ArrayList<>();

      while (aClass != null) {
        collectTargetsInClass(element, targetClass, aClass, result);
        if (aClass.hasModifierProperty(PsiModifier.STATIC)) break;
        aClass = PsiTreeUtil.getParentOfType(aClass, PsiClass.class, true);
      }

      return result.toArray(new PsiElementClassMember[0]);
    });
  }
private static PsiElementClassMember @Nullable [] getTargetElements(PsiFile file, Editor editor)