Skip to content

Commit

Permalink
Merge branch '2024.2' into 2024.3
Browse files Browse the repository at this point in the history
  • Loading branch information
RedNesto committed Oct 1, 2024
2 parents 555d6d2 + 69a1bdd commit 8f90e21
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/kotlin/insight/generation/EventGenHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import com.intellij.psi.PsiElement
import com.intellij.psi.PsiFile
import com.intellij.psi.codeStyle.CodeStyleManager
import com.intellij.psi.util.parentOfType
import org.jetbrains.kotlin.analysis.api.KaIdeApi
import org.jetbrains.kotlin.idea.base.analysis.api.utils.shortenReferences
import org.jetbrains.kotlin.idea.base.analysis.api.utils.shortenReferencesInRange
import org.jetbrains.kotlin.idea.base.plugin.KotlinPluginMode
Expand Down Expand Up @@ -115,7 +116,7 @@ class KotlinEventGenHelper : EventGenHelper {
when (KotlinPluginModeProvider.currentPluginMode) {
KotlinPluginMode.K1 -> ShortenReferences.DEFAULT.process(insertedEntry)
// TODO find a non-internal alternative to this...
KotlinPluginMode.K2 -> shortenReferences(insertedEntry)
KotlinPluginMode.K2 -> @OptIn(KaIdeApi::class) shortenReferences(insertedEntry)
}
}

Expand All @@ -127,7 +128,7 @@ class KotlinEventGenHelper : EventGenHelper {
when (KotlinPluginModeProvider.currentPluginMode) {
KotlinPluginMode.K1 -> ShortenReferences.DEFAULT.process(file, marker.startOffset, marker.endOffset)
// TODO find a non-internal alternative to this...
KotlinPluginMode.K2 -> shortenReferencesInRange(file, marker.textRange)
KotlinPluginMode.K2 -> @OptIn(KaIdeApi::class) shortenReferencesInRange(file, marker.textRange)
}
}
}

0 comments on commit 8f90e21

Please sign in to comment.