Move incremental components to :core:descriptors.common module
This commit is contained in:
@@ -216,5 +216,3 @@ interface ResolverForModuleComputationTracker {
|
|||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
fun <T> ModuleInfo.getCapability(capability: ModuleCapability<T>) = capabilities[capability] as? T
|
fun <T> ModuleInfo.getCapability(capability: ModuleCapability<T>) = capabilities[capability] as? T
|
||||||
|
|
||||||
val ModuleDescriptor.moduleInfo: ModuleInfo?
|
|
||||||
get() = getCapability(ModuleInfo.Capability)
|
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.jetbrains.kotlin.analyzer
|
||||||
|
|
||||||
|
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
|
||||||
|
|
||||||
|
val ModuleDescriptor.moduleInfo: ModuleInfo?
|
||||||
|
get() = getCapability(ModuleInfo.Capability)
|
||||||
+10
-10
@@ -25,11 +25,11 @@ interface LookupTracker {
|
|||||||
val requiresPosition: Boolean
|
val requiresPosition: Boolean
|
||||||
|
|
||||||
fun record(
|
fun record(
|
||||||
filePath: String,
|
filePath: String,
|
||||||
position: Position,
|
position: Position,
|
||||||
scopeFqName: String,
|
scopeFqName: String,
|
||||||
scopeKind: ScopeKind,
|
scopeKind: ScopeKind,
|
||||||
name: String
|
name: String
|
||||||
)
|
)
|
||||||
|
|
||||||
object DO_NOTHING : LookupTracker {
|
object DO_NOTHING : LookupTracker {
|
||||||
@@ -47,9 +47,9 @@ enum class ScopeKind {
|
|||||||
}
|
}
|
||||||
|
|
||||||
data class LookupInfo(
|
data class LookupInfo(
|
||||||
val filePath: String,
|
val filePath: String,
|
||||||
val position: Position,
|
val position: Position,
|
||||||
val scopeFqName: String,
|
val scopeFqName: String,
|
||||||
val scopeKind: ScopeKind,
|
val scopeKind: ScopeKind,
|
||||||
val name: String
|
val name: String
|
||||||
) : Serializable
|
) : Serializable
|
||||||
Reference in New Issue
Block a user