mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] IDEA-353900 KTIJ-31325 k2: Moved shorten references to uast kotlin idea
GitOrigin-RevId: ceb9c97e9e59e1ccded9857c420fffb482a44660
This commit is contained in:
committed by
intellij-monorepo-bot
parent
77db7b1b79
commit
bdcc4d2148
@@ -37,6 +37,5 @@
|
||||
<orderEntry type="library" name="kotlinc.low-level-api-fir" level="project" />
|
||||
<orderEntry type="library" name="kotlinc.analysis-api-platform-interface" level="project" />
|
||||
<orderEntry type="library" name="kotlinc.symbol-light-classes" level="project" />
|
||||
<orderEntry type="module" module-name="kotlin.base.analysis-api.utils" />
|
||||
</component>
|
||||
</module>
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.uast.kotlin
|
||||
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.idea.base.analysis.api.utils.shortenReferences
|
||||
import org.jetbrains.kotlin.psi.KtElement
|
||||
import org.jetbrains.uast.kotlin.generate.KotlinUastBaseCodeGenerationPlugin
|
||||
|
||||
abstract class FirKotlinUastCodeGenerationPlugin : KotlinUastBaseCodeGenerationPlugin() {
|
||||
override fun shortenReference(sourcePsi: KtElement): PsiElement? {
|
||||
shortenReferences(sourcePsi)
|
||||
return sourcePsi
|
||||
}
|
||||
}
|
||||
@@ -25,5 +25,6 @@
|
||||
<orderEntry type="module" module-name="kotlin.test-framework" scope="TEST" />
|
||||
<orderEntry type="module" module-name="kotlin.base.util" />
|
||||
<orderEntry type="module" module-name="kotlin.refactorings.common" />
|
||||
<orderEntry type="module" module-name="kotlin.base.analysis-api.utils" />
|
||||
</component>
|
||||
</module>
|
||||
+10
-1
@@ -3,20 +3,29 @@ package org.jetbrains.uast.kotlin
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.analysis.api.permissions.KaAllowAnalysisOnEdt
|
||||
import org.jetbrains.kotlin.analysis.api.permissions.allowAnalysisOnEdt
|
||||
import org.jetbrains.kotlin.idea.base.analysis.api.utils.shortenReferences
|
||||
import org.jetbrains.kotlin.idea.refactoring.moveFunctionLiteralOutsideParentheses
|
||||
import org.jetbrains.kotlin.idea.refactoring.rename.KtReferenceMutateServiceBase
|
||||
import org.jetbrains.kotlin.idea.references.KtReferenceMutateService
|
||||
import org.jetbrains.kotlin.psi.KtCallExpression
|
||||
import org.jetbrains.kotlin.psi.KtElement
|
||||
import org.jetbrains.uast.UElement
|
||||
import org.jetbrains.uast.generate.UastCommentSaver
|
||||
import org.jetbrains.uast.generate.UastElementFactory
|
||||
import org.jetbrains.uast.kotlin.generate.KotlinUastBaseCodeGenerationPlugin
|
||||
import org.jetbrains.uast.kotlin.generate.KotlinUastElementFactory
|
||||
import org.jetbrains.uast.kotlin.generate.createUastCommentSaver
|
||||
|
||||
|
||||
class IdeaFirKotlinUastCodeGenerationPlugin : FirKotlinUastCodeGenerationPlugin(){
|
||||
class IdeaFirKotlinUastCodeGenerationPlugin : KotlinUastBaseCodeGenerationPlugin(){
|
||||
override fun shortenReference(sourcePsi: KtElement): PsiElement {
|
||||
shortenReferences(sourcePsi)
|
||||
return sourcePsi
|
||||
}
|
||||
|
||||
@OptIn(KaAllowAnalysisOnEdt::class)
|
||||
override fun getElementFactory(project: Project): UastElementFactory {
|
||||
return object : KotlinUastElementFactory(project) {
|
||||
|
||||
Reference in New Issue
Block a user