boolean (@NotNull PsiPackage aPackage) { PsiDirectory[] directories = aPackage.getDirectories(); for (PsiDirectory directory : directories) { if (directory.isValid() && directory.isWritable()) { return true; } } return false; }