private static int compareDirectoryPaths(@NotNull FileTargetContextWrapper d1, @NotNull FileTargetContextWrapper d2) {
    PsiFileSystemItem directory1 = d1.getTargetContext().getFileSystemItem();
    PsiFileSystemItem directory2 = d2.getTargetContext().getFileSystemItem();

    assert directory1 != null : "Invalid PsiFileSystemItem instances found";
    assert directory2 != null : "Invalid PsiFileSystemItem instances found";

    VirtualFile f1 = directory1.getVirtualFile();
    VirtualFile f2 = directory2.getVirtualFile();
    return f1.getPath().compareTo(f2.getPath());
  }
private static int compareDirectoryPaths(@NotNull FileTargetContextWrapper d1, @NotNull FileTargetContextWrapper d2)