@Override
  public @Nullable String getPackageNameByDirectory(@NotNull VirtualFile dir) {
    for (VirtualFile root : roots()) {
      if (VfsUtilCore.isAncestor(root, dir, false)) {
        return VfsUtilCore.getRelativePath(dir, root, '.');
      }
    }
    return null;
  }
@Override
  public @Nullable String getPackageNameByDirectory(@NotNull VirtualFile dir)