@ApiStatus.Internal
  public PsiFileStub<?> @NotNull [] getStubRoots() {
    if (myStubRoots != null) return myStubRoots;

    T psi = getPsi();
    if (psi == null) {
      return new PsiFileStub[]{this};
    }

    FileViewProvider viewProvider = psi.getViewProvider();
    PsiFile stubBindingRoot = viewProvider.getStubBindingRoot();

    StubTree baseTree = getOrCalcStubTree(stubBindingRoot);
    if (baseTree != null) {
      List<PsiFileStub<?>> roots = new SmartList<>(baseTree.getRoot());
      List<Pair<IStubFileElementType<?>, PsiFile>> stubbedRoots = StubTreeBuilder.getStubbedRoots(viewProvider);
      for (Pair<IStubFileElementType<?>, PsiFile> stubbedRoot : stubbedRoots) {
        if (stubbedRoot.second == stubBindingRoot) continue;
        StubTree secondaryStubTree = getOrCalcStubTree(stubbedRoot.second);
        if (secondaryStubTree != null) {
          PsiFileStub<?> root = secondaryStubTree.getRoot();
          roots.add(root);
        }
      }
      PsiFileStub<?>[] rootsArray = roots.toArray(EMPTY_ARRAY);
      for (PsiFileStub<?> root : rootsArray) {
        if (root instanceof PsiFileStubImpl) {
          ((PsiFileStubImpl<?>)root).setStubRoots(rootsArray);
        }
      }

      myStubRoots = rootsArray;
      return rootsArray;
    }
    return EMPTY_ARRAY;
  }
@ApiStatus.Internal
  public PsiFileStub<?> @NotNull [] getStubRoots()