List<Object> (final PsiElement psiElement, @Nullable DataContext dataContext, @Nullable NavBarModelExtension ownerExtension) { final Set<VirtualFile> roots = new HashSet<>(); final ProjectRootManager projectRootManager = ProjectRootManager.getInstance(myProject); final ProjectFileIndex projectFileIndex = projectRootManager.getFileIndex(); for (VirtualFile root : projectRootManager.getContentRoots()) { VirtualFile parent = root.getParent(); if (parent == null || !projectFileIndex.isInContent(parent)) { roots.add(root); } } for (final NavBarModelExtension modelExtension : NavBarModelExtension.EP_NAME.getExtensionList()) { for (VirtualFile root : modelExtension.additionalRoots(psiElement.getProject())) { VirtualFile parent = root.getParent(); if (parent == null || !projectFileIndex.isInContent(parent)) { roots.add(root); } } } List<Object> updatedModel = ReadAction.compute(() -> isValid(psiElement) ? myBuilder.createModel(psiElement, roots, dataContext, ownerExtension) : Collections.emptyList()); return ContainerUtil.reverse(updatedModel); }