public abstract class GistManager
extends java.lang.Object
Constructor and Description |
---|
GistManager() |
Modifier and Type | Method and Description |
---|---|
static GistManager |
getInstance() |
abstract void |
invalidateData()
Force all gists to be recalculated on the next request.
|
abstract <Data> PsiFileGist<Data> |
newPsiFileGist(java.lang.String id,
int version,
DataExternalizer<Data> externalizer,
NullableFunction<PsiFile,Data> calcData)
Create a new
PsiFileGist . |
abstract <Data> VirtualFileGist<Data> |
newVirtualFileGist(java.lang.String id,
int version,
DataExternalizer<Data> externalizer,
VirtualFileGist.GistCalculator<Data> calcData)
Create a new
VirtualFileGist . |
public static GistManager getInstance()
public abstract <Data> VirtualFileGist<Data> newVirtualFileGist(java.lang.String id, int version, DataExternalizer<Data> externalizer, VirtualFileGist.GistCalculator<Data> calcData)
VirtualFileGist
.Data
- the type of the data to cacheid
- a unique identifier of this dataversion
- should be incremented each time the externalizer
or calcData
logic changes.externalizer
- used to store the data to the disk and retrieve itcalcData
- calculates the data by the file content when neededVirtualFileGist.getFileData(com.intellij.openapi.project.Project, com.intellij.openapi.vfs.VirtualFile)
can later be used to retrieve the cached datapublic abstract <Data> PsiFileGist<Data> newPsiFileGist(java.lang.String id, int version, DataExternalizer<Data> externalizer, NullableFunction<PsiFile,Data> calcData)
PsiFileGist
.Data
- the type of the data to cacheid
- a unique identifier of this dataversion
- should be incremented each time the externalizer
or calcData
logic changes.externalizer
- used to store the data to the disk and retrieve itcalcData
- calculates the data by the file content when neededPsiFileGist.getFileData(com.intellij.psi.PsiFile)
can later be used to retrieve the cached datapublic abstract void invalidateData()