DocumentEx (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; }