Refactoring: do not store scriptModuleInfo inside ScriptDependenciesInfo
Cache for ScriptDependenciesInfo.ForFile is dropped because there is a cache for ScriptModuleInfo, so the facade for dependencies shouldn't be created too often Cache for ScriptDependenciesInfo.ForProject is stored in a field
This commit is contained in:
+1
-1
@@ -67,7 +67,7 @@ class IdeSamWithReceiverComponentContributor(val project: Project) : StorageComp
|
||||
val annotations =
|
||||
when (moduleInfo) {
|
||||
is ScriptModuleInfo -> moduleInfo.scriptDefinition.annotationsForSamWithReceivers
|
||||
is ScriptDependenciesInfo.ForFile -> moduleInfo.scriptModuleInfo.scriptDefinition?.annotationsForSamWithReceivers
|
||||
is ScriptDependenciesInfo.ForFile -> moduleInfo.scriptDefinition.annotationsForSamWithReceivers
|
||||
is ModuleProductionSourceInfo -> getAnnotationsForModule(moduleInfo.module)
|
||||
else -> null
|
||||
} ?: return
|
||||
|
||||
Reference in New Issue
Block a user