ProjectAbstractTreeStructureBase () { return new ProjectViewPaneTreeStructure() { @Override protected AbstractTreeNode<?> createRoot(@NotNull final Project project, @NotNull ViewSettings settings) { return new ProjectViewProjectNode(project, settings) { @NotNull @Override public Collection<AbstractTreeNode<?>> getChildren() { Project project = Objects.requireNonNull(getProject()); Set<AbstractTreeNode<?>> result = new LinkedHashSet<>(); PsiManager psiManager = PsiManager.getInstance(project); for (VirtualFile virtualFile : ProjectRootManager.getInstance(project).getContentRoots()) { PsiDirectory directory = psiManager.findDirectory(virtualFile); if (directory == null) continue; result.add(new PsiDirectoryNode(getProject(), directory, getSettings()) { @Override protected boolean shouldShowModuleName() { return false; } }); } return result; } }; } }; }