@Override
  public @Nullable String getPackageNameByDirectory(@NotNull VirtualFile dir) {
    if (!dir.isDirectory()) {
      LOG.error(dir.getPresentableUrl() + " is not a directory");
    }
    return myDirectoryIndex.getPackageName(dir);
  }
@Override
  public @Nullable String getPackageNameByDirectory(@NotNull VirtualFile dir)