protected @Nullable PsiPackage getPsiPackage(String newQualifiedName) {
    PsiDirectory dir = PackageUtil.findOrCreateDirectoryForPackage(myProject, newQualifiedName, null, false);
    if (dir == null) return null;
    return JavaDirectoryService.getInstance().getPackage(dir);
  }
protected @Nullable PsiPackage getPsiPackage(String newQualifiedName)