@Override
  public @NotNull DocumentReference create(@NotNull Document document) {
    assertIsWriteThread();

    VirtualFile file = FileDocumentManager.getInstance().getFile(document);
    return file == null || !file.isValid() ? createFromDocument(document) : create(file);
  }
@Override
  public @NotNull DocumentReference create(@NotNull Document document)