Add analysis:kt-reference module and move KtReferences there.

This commit is contained in:
Mads Ager
2022-01-19 17:11:40 +01:00
committed by Ilya Kirillov
parent 5320a32d67
commit 6f0bb0eda5
20 changed files with 35 additions and 16 deletions
+2 -1
View File
@@ -9,6 +9,7 @@ dependencies {
implementation(project(":compiler:frontend.java"))
implementation(project(":analysis:analysis-api-impl-base"))
implementation(project(":analysis:analysis-internal-utils"))
implementation(project(":analysis:kt-reference"))
implementation(project(":compiler:backend"))
implementation(project(":compiler:backend.jvm"))
@@ -42,4 +43,4 @@ projectTest(jUnitMode = JUnitMode.JUnit5) {
useJUnitPlatform()
}
testsJar()
testsJar()
+1 -2
View File
@@ -21,6 +21,7 @@ dependencies {
api(intellijCore())
implementation(project(":analysis:analysis-api-providers"))
implementation(project(":analysis:analysis-internal-utils"))
implementation(project(":analysis:kt-reference"))
testApi(projectTests(":analysis:low-level-api-fir"))
testApi(projectTests(":compiler:tests-common"))
@@ -84,5 +85,3 @@ val generateCode by tasks.registering(NoDebugJavaExec::class) {
val compileKotlin by tasks
compileKotlin.dependsOn(generateCode)
@@ -12,6 +12,7 @@ import org.jetbrains.kotlin.analysis.api.fir.symbols.KtFirPackageSymbol
import org.jetbrains.kotlin.analysis.api.symbols.KtSymbol
import org.jetbrains.kotlin.analysis.low.level.api.fir.api.getOrBuildFir
import org.jetbrains.kotlin.analysis.low.level.api.fir.api.getOrBuildFirSafe
import org.jetbrains.kotlin.fir.*
import org.jetbrains.kotlin.fir.declarations.*
import org.jetbrains.kotlin.fir.declarations.builder.buildImport
import org.jetbrains.kotlin.fir.declarations.synthetic.FirSyntheticProperty
@@ -7,6 +7,7 @@ dependencies {
api(project(":compiler:psi"))
api(project(":analysis:analysis-api"))
api(project(":analysis:analysis-api-impl-barebone"))
api(project(":analysis:kt-reference"))
api(intellijCore())
implementation(project(":analysis:analysis-internal-utils"))
@@ -27,4 +28,4 @@ sourceSets {
"test" { projectDefault() }
}
testsJar()
testsJar()
+1
View File
@@ -17,6 +17,7 @@ dependencies {
compileOnly(project(":analysis:low-level-api-fir"))
implementation(project(":analysis:analysis-internal-utils"))
implementation(project(":analysis:analysis-api-providers"))
implementation(project(":analysis:kt-reference"))
api(intellijCore())
api(commonDependency("com.google.guava:guava"))
+16
View File
@@ -0,0 +1,16 @@
plugins {
kotlin("jvm")
id("jps-compatible")
}
dependencies {
implementation(project(":compiler:psi"))
implementation(intellijCore())
compileOnly(commonDependency("com.google.guava:guava"))
}
sourceSets {
"main" { projectDefault() }
"test" { none() }
}
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2022 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.
*/
@@ -33,4 +33,4 @@ abstract class KtArrayAccessReference(
companion object {
private val NAMES = listOf(OperatorNameConventions.GET, OperatorNameConventions.SET)
}
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2022 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.
*/
@@ -28,4 +28,4 @@ abstract class KtCollectionLiteralReference(expression: KtCollectionLiteralExpre
get() = COLLECTION_LITERAL_CALL_NAMES
private fun PsiElement.normalizeRange(): TextRange = this.textRange.shiftRight(-expression.textOffset)
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2022 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.
*/
@@ -28,4 +28,4 @@ abstract class KtForLoopInReference(element: KtForExpression) : KtMultiReference
OperatorNameConventions.HAS_NEXT
)
}
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2022 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.
*/
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2022 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.
*/
@@ -1,11 +1,10 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2022 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.idea.references
import com.intellij.openapi.extensions.Extensions
import com.intellij.openapi.util.TextRange
import com.intellij.psi.PsiElement
import org.jetbrains.kotlin.lexer.KtTokens
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2022 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.
*/
@@ -7,7 +7,6 @@ package org.jetbrains.kotlin.idea.references
import com.intellij.openapi.util.TextRange
import com.intellij.psi.PsiElement
import com.intellij.psi.PsiMethod
import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.psi.KtNameReferenceExpression
+1
View File
@@ -159,6 +159,7 @@ val commonCompilerModules = arrayOf(
":analysis:decompiled:decompiler-to-file-stubs",
":analysis:decompiled:decompiler-to-psi",
":analysis:decompiled:light-classes-for-decompiled",
":analysis:kt-reference",
).also { extra["commonCompilerModules"] = it }
val firCompilerCoreModules = arrayOf(
+1
View File
@@ -501,6 +501,7 @@ include ":generators:analysis-api-generator",
":analysis:analysis-api-impl-base",
":analysis:analysis-api-providers",
":analysis:analysis-internal-utils",
":analysis:kt-reference",
":analysis:symbol-light-classes",
":analysis:project-structure",
":analysis:analysis-api-fe10",