- 所有超级接口:
PsiElement
- 所有已知子接口:
PsiBinaryFile,PsiPlainTextFile
A PSI element representing a file.
Please see IntelliJ Platform Architectural Overview
for high-level overview.
- 另请参阅:
-
fleet.com.intellij.openapi.actionSystem.LangDataKeys#PSI_FILEPsiElement.getContainingFile()PsiManager#findFile(VirtualFile)PsiDocumentManager#getPsiFile(fleet.com.intellij.openapi.editor.Document)
-
字段概要
字段修饰符和类型字段说明static final PsiFile[]The empty array of PSI files which can be reused to avoid unnecessary allocations. -
方法概要
修饰符和类型方法说明default voidInvalidate any file-specific cache in this method.longGets the modification stamp value.@NotNull PsiFileIf the file is a non-physical copy of a file, returns the original file which had been copied.@NotNull PsiFile[]已过时。voidCalled by the PSI framework when the contents of the file changes.从接口继承的方法 com.intellij.psi.PsiElement
add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, copy, delete, deleteChildRange, findElementAt, findReferenceAt, getChildren, getContainingFile, getContext, getFirstChild, getLanguage, getLastChild, getNavigationElement, getNextSibling, getNode, getOriginalElement, getParent, getPrevSibling, getReference, getStartOffsetInParent, getText, getTextLength, getTextOffset, getTextRange, isEquivalentTo, isPhysical, isValid, isWritable, replace, textContains, textMatches, textMatches, textToCharArray, toString
-
字段详细资料
-
EMPTY_ARRAY
The empty array of PSI files which can be reused to avoid unnecessary allocations.
-
-
方法详细资料
-
getModificationStamp
long getModificationStamp()Gets the modification stamp value. Modification stamp is a value changed by any modification of the content of the file. Note that it is not related to the file modification time.- 返回:
- the modification stamp value
- 另请参阅:
-
VirtualFile#getModificationStamp()
-
getOriginalFile
If the file is a non-physical copy of a file, returns the original file which had been copied. Otherwise, returns the same file.- 返回:
- the original file of a copy, or the same file if the file is not a copy.
-
getPsiRoots
已过时。UseFileViewProvider#getAllFiles()instead.If the file contains multiple interspersed languages, returns the roots for PSI trees for each of these languages. (For example, a JSPX file contains JSP, XML and Java trees.)- 返回:
- the array of PSI roots, or a single-element array containing
thisif the file has only a single language.
-
subtreeChanged
void subtreeChanged()Called by the PSI framework when the contents of the file changes. If you override this method, you must call the base class implementation. While this method can be used to invalidate file-level caches, it is more much safe to invalidate them inclearCaches()since file contents can be reloaded completely (without any specific subtree change) without this method being called. -
clearCaches
default void clearCaches()Invalidate any file-specific cache in this method. It is called on file content change. If you override this method, you must call the base class implementation.
-
FileViewProvider#getAllFiles()instead.