[LL API] Migrate 'getKtModule()' usages to 'ProjectStructureProvider'
Ensure the contextual module is passed wherever possible. ^KT-57559 Fixed
This commit is contained in:
@@ -5,12 +5,14 @@
|
||||
|
||||
package org.jetbrains.kotlin.analysis.api
|
||||
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.analysis.api.components.*
|
||||
import org.jetbrains.kotlin.analysis.api.lifetime.KtLifetimeOwner
|
||||
import org.jetbrains.kotlin.analysis.api.lifetime.KtLifetimeToken
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.*
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.pointers.KtSymbolPointer
|
||||
import org.jetbrains.kotlin.analysis.project.structure.KtModule
|
||||
import org.jetbrains.kotlin.analysis.project.structure.ProjectStructureProvider
|
||||
import org.jetbrains.kotlin.psi.KtElement
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
|
||||
@@ -178,3 +180,7 @@ public abstract class KtAnalysisSession(final override val token: KtLifetimeToke
|
||||
get() = typesCreatorImpl
|
||||
protected abstract val typesCreatorImpl: KtTypeCreator
|
||||
}
|
||||
|
||||
public fun KtAnalysisSession.getModule(element: PsiElement): KtModule {
|
||||
return ProjectStructureProvider.getModule(element, useSiteModule)
|
||||
}
|
||||
Reference in New Issue
Block a user