[Analysis API] Implement separate caching for unstable dangling files
PSI events do not arrive for dangling files with no backing 'VirtualFile', so its partial invalidation becomes non-trivial. In the change, a short-living cache is implemented for these 'unstable' dangling files.
This commit is contained in:
+7
@@ -240,6 +240,13 @@ public interface KtDanglingFileModule : KtModule {
|
||||
get() = "Temporary file"
|
||||
}
|
||||
|
||||
/**
|
||||
* True if the dangling file module supports partial invalidation on PSI modifications.
|
||||
* Sessions for such modules can be cached for longer time.
|
||||
*/
|
||||
public val KtDanglingFileModule.isStable: Boolean
|
||||
get() = file.isPhysical && file.viewProvider.isEventSystemEnabled
|
||||
|
||||
/**
|
||||
* A set of sources which live outside the project content root. E.g, testdata files or source files of some other project.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user