|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.intellij.psi.PsiDocumentManager
public abstract class PsiDocumentManager
Manages the relationship between documents and PSI trees.
| Nested Class Summary | |
|---|---|
static interface |
PsiDocumentManager.Listener
Listener for receiving notifications about creation of Document and PsiFile instances. |
| Constructor Summary | |
|---|---|
PsiDocumentManager()
|
|
| Method Summary | ||
|---|---|---|
abstract void |
addListener(PsiDocumentManager.Listener listener)
Adds a listener for receiving notifications about creation of Document and PsiFile instances. |
|
abstract void |
commitAllDocuments()
Commits (updates the PSI tree for) all modified but not committed documents. |
|
abstract
|
commitAndRunReadAction(Computable<T> computation)
Commits the documents and runs the specified operation, which returns a value, in a read action. |
|
abstract void |
commitAndRunReadAction(java.lang.Runnable runnable)
Commits the documents and runs the specified operation, which does not return a value, in a read action. |
|
abstract void |
commitDocument(Document document)
Updates the PSI tree for the specified document. |
|
abstract Document |
getCachedDocument(PsiFile file)
Returns the cached document for the specified PSI file. |
|
abstract PsiFile |
getCachedPsiFile(Document document)
Returns the cached PSI file for the specified document. |
|
abstract Document |
getDocument(PsiFile file)
Returns the document for the specified PSI file. |
|
static PsiDocumentManager |
getInstance(Project project)
Returns the document manager instance for the specified project. |
|
abstract PsiFile |
getPsiFile(Document document)
Returns the PSI file for the specified document. |
|
abstract Document[] |
getUncommittedDocuments()
Returns the list of documents which have been modified but not committed. |
|
abstract boolean |
hasUncommitedDocuments()
Checks if any modified documents have not been committed. |
|
abstract boolean |
isUncommited(Document document)
Checks if the specified document has been committed. |
|
abstract void |
removeListener(PsiDocumentManager.Listener listener)
Removes a listener for receiving notifications about creation of Document and PsiFile instances. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PsiDocumentManager()
| Method Detail |
|---|
public static PsiDocumentManager getInstance(Project project)
project - the project for which the document manager is requested.
public abstract PsiFile getPsiFile(Document document)
document - the document for which the PSI file is requested.
@Nullable public abstract PsiFile getCachedPsiFile(Document document)
document - the document for which the PSI file is requested.
public abstract Document getDocument(PsiFile file)
file - the file for which the document is requested.
@Nullable public abstract Document getCachedDocument(PsiFile file)
file - the file for which the document is requested.
public abstract void commitAllDocuments()
public abstract void commitDocument(Document document)
document - the document to commit.public abstract Document[] getUncommittedDocuments()
commitDocument(com.intellij.openapi.editor.Document)public abstract boolean isUncommited(Document document)
document - the document to check.
commitDocument(com.intellij.openapi.editor.Document)public abstract boolean hasUncommitedDocuments()
public abstract void commitAndRunReadAction(java.lang.Runnable runnable)
runnable - the operation to execute.public abstract <T> T commitAndRunReadAction(Computable<T> computation)
computation - the operation to execute.
public abstract void addListener(PsiDocumentManager.Listener listener)
Document and PsiFile instances.
listener - the listener to add.public abstract void removeListener(PsiDocumentManager.Listener listener)
Document and PsiFile instances.
listener - the listener to add.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||