PsiDirectory[] (@NotNull GlobalSearchScope scope) { String qName = myQualifiedName; while (qName.endsWith(".")) { qName = StringUtil.trimEnd(qName, "."); } final PsiPackage aPackage = JavaPsiFacade.getInstance(myManager.getProject()).findPackage(qName); if (aPackage != null) { return aPackage.getDirectories(scope); } else { return PsiDirectory.EMPTY_ARRAY; } }