Explicitly state that PluginDeclarationProviderFactory is source-only

Before this change `filesScope` was effectively empty in cases when
module info is a library, thus looking
into PackageIndexUtil.packageExists(name, indexedFilesScope, project)
was kind of redundant since it always returns false for empty scopes

The initial motivation was run by 1716720604
that made PackageIndexUtil::packageExists calls much more frequent
This commit is contained in:
Denis Zharkov
2018-01-24 15:59:27 +03:00
parent 2224f95294
commit 31e73e90d6
9 changed files with 31 additions and 31 deletions
@@ -16,7 +16,6 @@
package org.jetbrains.kotlin.resolve.jvm
import com.intellij.psi.search.GlobalSearchScope
import org.jetbrains.kotlin.analyzer.*
import org.jetbrains.kotlin.config.JvmTarget
import org.jetbrains.kotlin.container.get
@@ -58,7 +57,7 @@ object JvmAnalyzerFacade : AnalyzerFacade() {
val project = moduleContext.project
val declarationProviderFactory = DeclarationProviderFactoryService.createDeclarationProviderFactory(
project, moduleContext.storageManager, syntheticFiles,
if (moduleInfo.isLibrary) GlobalSearchScope.EMPTY_SCOPE else moduleContentScope,
moduleContentScope,
moduleInfo
)