public interface PsiModificationTracker extends ModificationTracker
getModificationCount()
, getJavaStructureModificationCount()
, getOutOfCodeBlockModificationCount()
Make a CachedValue
instance dependent on a specific PSI modification tracker.
To achieve that, one should can one of the constants in this interface as CachedValueProvider.Result
dependencies.
Subscribe to any PSI change (for example, to drop caches in the listener manually).
See PsiModificationTracker.Listener
Modifier and Type | Interface and Description |
---|---|
static interface |
PsiModificationTracker.Listener
A listener to be notified on any PSI modification count change (which happens on any physical PSI change).
|
static class |
PsiModificationTracker.SERVICE
Provides a way to get the instance of
PsiModificationTracker corresponding to a given project. |
Modifier and Type | Field and Description |
---|---|
static Key |
JAVA_STRUCTURE_MODIFICATION_COUNT
Deprecated.
rarely supported by JVM language plugins; also a wrong way for optimisations
|
static Key |
MODIFICATION_COUNT
This key can be passed as a dependency in a
CachedValueProvider . |
static Key |
OUT_OF_CODE_BLOCK_MODIFICATION_COUNT
Deprecated.
rarely supported by language plugins; also a wrong way for optimisations
|
static Topic<PsiModificationTracker.Listener> |
TOPIC
A topic to subscribe for all PSI modification count changes.
|
EVER_CHANGED, NEVER_CHANGED
Modifier and Type | Method and Description |
---|---|
long |
getJavaStructureModificationCount()
Deprecated.
rarely supported by JVM language plugins; also a wrong way for optimisations
|
ModificationTracker |
getJavaStructureModificationTracker()
Deprecated.
rarely supported by JVM language plugins; also a wrong way for optimisations
|
long |
getModificationCount()
Tracks any PSI modification.
|
long |
getOutOfCodeBlockModificationCount()
Deprecated.
rarely supported by language plugins; also a wrong way for optimisations
|
ModificationTracker |
getOutOfCodeBlockModificationTracker()
Deprecated.
rarely supported by language plugins; also a wrong way for optimisations
|
static final Key MODIFICATION_COUNT
CachedValueProvider
.
The corresponding CachedValue
will then be flushed on every physical PSI change.getModificationCount()
@Deprecated static final Key OUT_OF_CODE_BLOCK_MODIFICATION_COUNT
CachedValueProvider
.
The corresponding CachedValue
will then be flushed on every physical PSI change that doesn't happen inside a Java code block.
This can include changes on Java class or file level, or changes in non-Java files, e.g. XML. Rarely needed.getOutOfCodeBlockModificationCount()
@Deprecated static final Key JAVA_STRUCTURE_MODIFICATION_COUNT
CachedValueProvider
.
The corresponding CachedValue
will then be flushed on every physical PSI change that can affect Java structure and resolve.getJavaStructureModificationCount()
static final Topic<PsiModificationTracker.Listener> TOPIC
MessageBus
long getModificationCount()
getModificationCount
in interface ModificationTracker
@Deprecated long getOutOfCodeBlockModificationCount()
getJavaStructureModificationCount()
, but also includes changes in non-Java files, e.g. XML. Rarely needed.@Deprecated ModificationTracker getOutOfCodeBlockModificationTracker()
getOutOfCodeBlockModificationCount()
@Deprecated long getJavaStructureModificationCount()
@Deprecated ModificationTracker getJavaStructureModificationTracker()
getJavaStructureModificationCount()