public interface PsiFileGist<Data>
PsiFile
content, persists it between IDE restarts,
and updates it when the content is changed. The data is calculated lazily, when needed.
Obtained using GistManager.newPsiFileGist(java.lang.String, int, com.intellij.util.io.DataExternalizer<Data>, com.intellij.util.NullableFunction<com.intellij.psi.PsiFile, Data>)
.
The difference to VirtualFileGist
is that PSI content is used here. So if an uncommitted document is saved onto disk,
this class will use the last committed content of the PSI file, while VirtualFileGist
will use the saved virtual file content.
Please note that VirtualFileGist is used inside, so using PsiFileGist has the same performance implications (see VirtualFileGist
documentation).Modifier and Type | Method and Description |
---|---|
Data |
getFileData(PsiFile file)
Calculate or get the cached data by the current PSI content.
|