Add analysis:kt-reference module and move KtReferences there.
This commit is contained in:
@@ -9,6 +9,7 @@ dependencies {
|
|||||||
implementation(project(":compiler:frontend.java"))
|
implementation(project(":compiler:frontend.java"))
|
||||||
implementation(project(":analysis:analysis-api-impl-base"))
|
implementation(project(":analysis:analysis-api-impl-base"))
|
||||||
implementation(project(":analysis:analysis-internal-utils"))
|
implementation(project(":analysis:analysis-internal-utils"))
|
||||||
|
implementation(project(":analysis:kt-reference"))
|
||||||
|
|
||||||
implementation(project(":compiler:backend"))
|
implementation(project(":compiler:backend"))
|
||||||
implementation(project(":compiler:backend.jvm"))
|
implementation(project(":compiler:backend.jvm"))
|
||||||
@@ -42,4 +43,4 @@ projectTest(jUnitMode = JUnitMode.JUnit5) {
|
|||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
}
|
}
|
||||||
|
|
||||||
testsJar()
|
testsJar()
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ dependencies {
|
|||||||
api(intellijCore())
|
api(intellijCore())
|
||||||
implementation(project(":analysis:analysis-api-providers"))
|
implementation(project(":analysis:analysis-api-providers"))
|
||||||
implementation(project(":analysis:analysis-internal-utils"))
|
implementation(project(":analysis:analysis-internal-utils"))
|
||||||
|
implementation(project(":analysis:kt-reference"))
|
||||||
|
|
||||||
testApi(projectTests(":analysis:low-level-api-fir"))
|
testApi(projectTests(":analysis:low-level-api-fir"))
|
||||||
testApi(projectTests(":compiler:tests-common"))
|
testApi(projectTests(":compiler:tests-common"))
|
||||||
@@ -84,5 +85,3 @@ val generateCode by tasks.registering(NoDebugJavaExec::class) {
|
|||||||
val compileKotlin by tasks
|
val compileKotlin by tasks
|
||||||
|
|
||||||
compileKotlin.dependsOn(generateCode)
|
compileKotlin.dependsOn(generateCode)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
@@ -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.api.symbols.KtSymbol
|
||||||
import org.jetbrains.kotlin.analysis.low.level.api.fir.api.getOrBuildFir
|
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.analysis.low.level.api.fir.api.getOrBuildFirSafe
|
||||||
|
import org.jetbrains.kotlin.fir.*
|
||||||
import org.jetbrains.kotlin.fir.declarations.*
|
import org.jetbrains.kotlin.fir.declarations.*
|
||||||
import org.jetbrains.kotlin.fir.declarations.builder.buildImport
|
import org.jetbrains.kotlin.fir.declarations.builder.buildImport
|
||||||
import org.jetbrains.kotlin.fir.declarations.synthetic.FirSyntheticProperty
|
import org.jetbrains.kotlin.fir.declarations.synthetic.FirSyntheticProperty
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ dependencies {
|
|||||||
api(project(":compiler:psi"))
|
api(project(":compiler:psi"))
|
||||||
api(project(":analysis:analysis-api"))
|
api(project(":analysis:analysis-api"))
|
||||||
api(project(":analysis:analysis-api-impl-barebone"))
|
api(project(":analysis:analysis-api-impl-barebone"))
|
||||||
|
api(project(":analysis:kt-reference"))
|
||||||
api(intellijCore())
|
api(intellijCore())
|
||||||
implementation(project(":analysis:analysis-internal-utils"))
|
implementation(project(":analysis:analysis-internal-utils"))
|
||||||
|
|
||||||
@@ -27,4 +28,4 @@ sourceSets {
|
|||||||
"test" { projectDefault() }
|
"test" { projectDefault() }
|
||||||
}
|
}
|
||||||
|
|
||||||
testsJar()
|
testsJar()
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ dependencies {
|
|||||||
compileOnly(project(":analysis:low-level-api-fir"))
|
compileOnly(project(":analysis:low-level-api-fir"))
|
||||||
implementation(project(":analysis:analysis-internal-utils"))
|
implementation(project(":analysis:analysis-internal-utils"))
|
||||||
implementation(project(":analysis:analysis-api-providers"))
|
implementation(project(":analysis:analysis-api-providers"))
|
||||||
|
implementation(project(":analysis:kt-reference"))
|
||||||
|
|
||||||
api(intellijCore())
|
api(intellijCore())
|
||||||
api(commonDependency("com.google.guava:guava"))
|
api(commonDependency("com.google.guava:guava"))
|
||||||
|
|||||||
@@ -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() }
|
||||||
|
}
|
||||||
+2
-2
@@ -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.
|
* 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 {
|
companion object {
|
||||||
private val NAMES = listOf(OperatorNameConventions.GET, OperatorNameConventions.SET)
|
private val NAMES = listOf(OperatorNameConventions.GET, OperatorNameConventions.SET)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-2
@@ -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.
|
* 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
|
get() = COLLECTION_LITERAL_CALL_NAMES
|
||||||
|
|
||||||
private fun PsiElement.normalizeRange(): TextRange = this.textRange.shiftRight(-expression.textOffset)
|
private fun PsiElement.normalizeRange(): TextRange = this.textRange.shiftRight(-expression.textOffset)
|
||||||
}
|
}
|
||||||
+2
-2
@@ -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.
|
* 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
|
OperatorNameConventions.HAS_NEXT
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -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.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
+1
-1
@@ -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.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
+1
-2
@@ -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.
|
* 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
|
package org.jetbrains.kotlin.idea.references
|
||||||
|
|
||||||
import com.intellij.openapi.extensions.Extensions
|
|
||||||
import com.intellij.openapi.util.TextRange
|
import com.intellij.openapi.util.TextRange
|
||||||
import com.intellij.psi.PsiElement
|
import com.intellij.psi.PsiElement
|
||||||
import org.jetbrains.kotlin.lexer.KtTokens
|
import org.jetbrains.kotlin.lexer.KtTokens
|
||||||
+1
-2
@@ -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.
|
* 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.openapi.util.TextRange
|
||||||
import com.intellij.psi.PsiElement
|
import com.intellij.psi.PsiElement
|
||||||
import com.intellij.psi.PsiMethod
|
|
||||||
import org.jetbrains.kotlin.name.Name
|
import org.jetbrains.kotlin.name.Name
|
||||||
import org.jetbrains.kotlin.psi.KtNameReferenceExpression
|
import org.jetbrains.kotlin.psi.KtNameReferenceExpression
|
||||||
|
|
||||||
@@ -159,6 +159,7 @@ val commonCompilerModules = arrayOf(
|
|||||||
":analysis:decompiled:decompiler-to-file-stubs",
|
":analysis:decompiled:decompiler-to-file-stubs",
|
||||||
":analysis:decompiled:decompiler-to-psi",
|
":analysis:decompiled:decompiler-to-psi",
|
||||||
":analysis:decompiled:light-classes-for-decompiled",
|
":analysis:decompiled:light-classes-for-decompiled",
|
||||||
|
":analysis:kt-reference",
|
||||||
).also { extra["commonCompilerModules"] = it }
|
).also { extra["commonCompilerModules"] = it }
|
||||||
|
|
||||||
val firCompilerCoreModules = arrayOf(
|
val firCompilerCoreModules = arrayOf(
|
||||||
|
|||||||
@@ -501,6 +501,7 @@ include ":generators:analysis-api-generator",
|
|||||||
":analysis:analysis-api-impl-base",
|
":analysis:analysis-api-impl-base",
|
||||||
":analysis:analysis-api-providers",
|
":analysis:analysis-api-providers",
|
||||||
":analysis:analysis-internal-utils",
|
":analysis:analysis-internal-utils",
|
||||||
|
":analysis:kt-reference",
|
||||||
":analysis:symbol-light-classes",
|
":analysis:symbol-light-classes",
|
||||||
":analysis:project-structure",
|
":analysis:project-structure",
|
||||||
":analysis:analysis-api-fe10",
|
":analysis:analysis-api-fe10",
|
||||||
|
|||||||
Reference in New Issue
Block a user