private @NotNull ECollection doGetStackForFile(@NotNull DocumentReference r) {
    ECollection result;
    VirtualFile file = r.getFile();

    if (file.isInLocalFileSystem()) {
      result = myDocumentStacks.computeIfAbsent(r, __ -> newCollection());
    }
    else {
      result = addWeaklyTrackedEmptyStack(file, myNonlocalVirtualFilesWithStacks);
    }

    return result;
  }
private @NotNull ECollection doGetStackForFile(@NotNull DocumentReference r)