PsiDirectory[] (Module module, DescriptionType descriptionType) { final JavaPsiFacade javaPsiFacade = JavaPsiFacade.getInstance(module.getProject()); final PsiPackage psiPackage = javaPsiFacade.findPackage(descriptionType.getDescriptionFolder()); if (psiPackage != null) { return psiPackage.getDirectories(GlobalSearchScope.moduleWithDependenciesScope(module)); } return PsiDirectory.EMPTY_ARRAY; }