AbstractTreeNode (@NotNull Module module) { final VirtualFile[] roots = ModuleRootManager.getInstance(module).getContentRoots(); if (roots.length == 1) { final PsiDirectory psi = PsiManager.getInstance(myProject).findDirectory(roots[0]); if (psi != null) { return new PsiDirectoryNode(myProject, psi, getSettings()); } } return new ProjectViewModuleNode(getProject(), module, getSettings()); }