gradle.kts: add clearCaches method for testing
This commit is contained in:
@@ -160,5 +160,10 @@ interface ScriptConfigurationManager {
|
||||
fun updateScriptDependenciesSynchronously(file: PsiFile, project: Project) {
|
||||
(getInstance(project) as AbstractScriptConfigurationManager).updateScriptDependenciesSynchronously(file)
|
||||
}
|
||||
|
||||
@TestOnly
|
||||
fun clearCaches(project: Project) {
|
||||
(getInstance(project) as AbstractScriptConfigurationManager).clearCaches()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
@@ -222,6 +222,7 @@ internal abstract class AbstractScriptConfigurationManager(
|
||||
override fun clearConfigurationCachesAndRehighlight() {
|
||||
ScriptDependenciesModificationTracker.getInstance(project).incModificationCount()
|
||||
|
||||
// todo: cache.clear()
|
||||
clearClassRootsCaches()
|
||||
|
||||
if (project.isOpen) {
|
||||
@@ -230,6 +231,11 @@ internal abstract class AbstractScriptConfigurationManager(
|
||||
}
|
||||
}
|
||||
|
||||
@TestOnly
|
||||
internal fun clearCaches() {
|
||||
cache.clear()
|
||||
}
|
||||
|
||||
private fun updateHighlighting(files: List<VirtualFile>) {
|
||||
if (files.isEmpty()) return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user