private @Nullable Document getCachedDocument() {
    Document document = com.intellij.reference.SoftReference.dereference(myDocument);
    if (document != null) return document;
    return FileDocumentManager.getInstance().getCachedDocument(getVirtualFile());
  }
private @Nullable Document getCachedDocument()