List<StubbedSpine> (PsiFile psiFile) { if (!(psiFile instanceof PsiFileImpl) && psiFile instanceof PsiFileWithStubSupport) { return Collections.singletonList(((PsiFileWithStubSupport)psiFile).getStubbedSpine()); } return ContainerUtil.map(StubTreeBuilder.getStubbedRoots(psiFile.getViewProvider()), t -> ((PsiFileImpl)t.second).getStubbedSpine()); }