public interface PsiFile extends PsiFileSystemItem
Iconable.IconFlags, Iconable.LastComputedIcon| Modifier and Type | Field and Description |
|---|---|
static PsiFile[] |
EMPTY_ARRAY
The empty array of PSI files which can be reused to avoid unnecessary allocations.
|
ARRAY_FACTORYICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITYEMPTY_NAVIGATABLE_ELEMENT_ARRAYEMPTY_NAVIGATION_ITEM_ARRAY| Modifier and Type | Method and Description |
|---|---|
default void |
clearCaches()
Invalidate any file-specific cache in this method.
|
PsiDirectory |
getContainingDirectory()
Returns the directory containing the file.
|
default IFileElementType |
getFileElementType() |
FileType |
getFileType()
Returns the file type for the file.
|
long |
getModificationStamp()
Gets the modification stamp value.
|
FileASTNode |
getNode()
Returns the AST node corresponding to the element.
|
PsiFile |
getOriginalFile()
If the file is a non-physical copy of a file, returns the original file which had
been copied.
|
PsiDirectory |
getParent()
Returns the parent of the PSI element.
|
PsiFile [] |
getPsiRoots()
Deprecated.
Use
FileViewProvider.getAllFiles() instead. |
FileViewProvider |
getViewProvider() |
VirtualFile |
getVirtualFile()
Returns the virtual file corresponding to the PSI file.
|
void |
subtreeChanged()
Called by the PSI framework when the contents of the file changes.
|
getName, isDirectory, processChildrencheckSetNamesetNameaccept, acceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, copy, delete, deleteChildRange, findElementAt, findReferenceAt, getChildren, getContainingFile, getContext, getCopyableUserData, getFirstChild, getLanguage, getLastChild, getManager, getNavigationElement, getNextSibling, getOriginalElement, getOwnReferences, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getStartOffsetInParent, getText, getTextLength, getTextOffset, getTextRange, getTextRangeInParent, getUseScope, isEquivalentTo, isPhysical, isValid, isWritable, processDeclarations, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArray, toStringgetUserData, putUserDatagetPresentationcanNavigate, canNavigateToSource, navigatestatic final PsiFile[] EMPTY_ARRAY
VirtualFile getVirtualFile()
getVirtualFile in interface PsiFileSystemItemnull if the file exists only in memory.PsiDirectory getContainingDirectory()
null if the file exists only in memory.PsiDirectory getParent()
PsiElementgetParent in interface PsiElementgetParent in interface PsiFileSystemItemlong getModificationStamp()
VirtualFile.getModificationStamp()PsiFile getOriginalFile()
FileType getFileType()
@Deprecated PsiFile [] getPsiRoots()
FileViewProvider.getAllFiles() instead.this
if the file has only a single language.FileViewProvider getViewProvider()
FileASTNode getNode()
PsiElementgetNode in interface PsiElementvoid subtreeChanged()
clearCaches()
since file contents can be reloaded completely (without any specific subtree change) without this method being called.default void clearCaches()
default IFileElementType getFileElementType()