PsiDirectory (@NotNull Module module, @NotNull PsiPackage element) { PsiDirectory[] sourceDirs = element.getDirectories(GlobalSearchScope.moduleScope(module)); if (sourceDirs.length == 0) return null; return sourceDirs[0]; }