public final class PsiDocumentManagerImpl extends PsiDocumentManagerBase
PsiDocumentManagerBase.PriorityEventCollector
PsiDocumentManager.Listener
Disposable.Parent
myDocumentCommitProcessor, myProject
ARRAY_FACTORY, EMPTY_ARRAY
Constructor and Description |
---|
PsiDocumentManagerImpl(Project project) |
Modifier and Type | Method and Description |
---|---|
void |
associatePsi(Document document,
PsiFile file) |
protected void |
beforeDocumentChangeOnUnlockedDocument(FileViewProvider viewProvider) |
void |
documentChanged(DocumentEvent event)
Called after the text of the document has been changed.
|
void |
doPostponedOperationsAndUnblockDocument(Document doc)
Applies pending changes made through the PSI to the specified document.
|
protected boolean |
finishCommitInWriteAction(Document document,
java.util.List<? extends BooleanRunnable> finishProcessors,
java.util.List<? extends BooleanRunnable> reparseInjectedProcessors,
boolean synchronously,
boolean forceNoPsiCommit) |
protected DocumentWindow |
freezeWindow(DocumentWindow document) |
PsiFile |
getPsiFile(Document document)
Returns the PSI file for the specified document.
|
boolean |
isDocumentBlockedByPsi(Document doc)
Checks if the PSI tree corresponding to the specified document has been modified and the changes have not
yet been applied to the document.
|
void |
reparseFiles(java.util.Collection<? extends VirtualFile> files,
boolean includeOpenFiles)
Reparses the specified set of files after an external configuration change that would cause them to be parsed differently
(for example, a language level change in the settings).
|
java.lang.String |
toString() |
addListener, addRunOnCommit, beforeDocumentChange, bulkUpdateFinished, bulkUpdateStarting, cachePsi, cancelAndRunWhenAllCommitted, checkConsistency, clearUncommittedDocuments, commitAllDocuments, commitAllDocumentsUnderProgress, commitAndRunReadAction, commitAndRunReadAction, commitDocument, disableBackgroundCommit, dispose, doCommitWithoutReparse, getCachedDocument, getCachedPsiFile, getDocument, getEventsSinceCommit, getLastCommittedDocument, getLastCommittedDocument, getLastCommittedStamp, getLastCommittedText, getSynchronizer, getUncommittedDocuments, hasEventSystemEnabledUncommittedDocuments, hasUncommitedDocuments, isCommitInProgress, isCommitted, isDefaultProject, isFullReparseInProgress, isUncommited, performForCommittedDocument, performLaterWhenAllCommitted, performLaterWhenAllCommitted, performWhenAllCommitted, removeListener, reparseFileFromText
getInstance
public PsiDocumentManagerImpl(Project project)
public PsiFile getPsiFile(Document document)
PsiDocumentManager
getPsiFile
in class PsiDocumentManagerBase
document
- the document for which the PSI file is requested.public void documentChanged(DocumentEvent event)
DocumentListener
documentChanged
in interface DocumentListener
documentChanged
in class PsiDocumentManagerBase
event
- the event containing the information about the change.protected void beforeDocumentChangeOnUnlockedDocument(FileViewProvider viewProvider)
beforeDocumentChangeOnUnlockedDocument
in class PsiDocumentManagerBase
protected boolean finishCommitInWriteAction(Document document, java.util.List<? extends BooleanRunnable> finishProcessors, java.util.List<? extends BooleanRunnable> reparseInjectedProcessors, boolean synchronously, boolean forceNoPsiCommit)
finishCommitInWriteAction
in class PsiDocumentManagerBase
public boolean isDocumentBlockedByPsi(Document doc)
PsiDocumentManager
PsiDocumentManager.doPostponedOperationsAndUnblockDocument(com.intellij.openapi.editor.Document)
.isDocumentBlockedByPsi
in class PsiDocumentManagerBase
doc
- the document to check.public void doPostponedOperationsAndUnblockDocument(Document doc)
PsiDocumentManager
doPostponedOperationsAndUnblockDocument
in class PsiDocumentManagerBase
doc
- the document to apply the changes to.public java.lang.String toString()
toString
in class java.lang.Object
public void reparseFiles(java.util.Collection<? extends VirtualFile> files, boolean includeOpenFiles)
PsiDocumentManager
reparseFiles
in class PsiDocumentManagerBase
files
- the files to reparse.includeOpenFiles
- if true, the files opened in editor tabs will also be reparsed.protected DocumentWindow freezeWindow(DocumentWindow document)
freezeWindow
in class PsiDocumentManagerBase
public void associatePsi(Document document, PsiFile file)
associatePsi
in class PsiDocumentManagerBase