private DocumentEx getCachedDocument(PsiFile psiFile, boolean force) {
    DocumentEx document = (DocumentEx)FileDocumentManager.getInstance().getCachedDocument(psiFile.getViewProvider().getVirtualFile());
    if (document == null || document instanceof DocumentWindow || !force && getTransaction(document) == null) {
      return null;
    }
    return document;
  }
private DocumentEx getCachedDocument(PsiFile psiFile, boolean force)