Skip to content

Commit

Permalink
Fix mixin target navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
RedNesto committed Jan 1, 2024
1 parent fbca0a5 commit 117fc78
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@ class MixinLineMarkerProvider : LineMarkerProviderDescriptor(), GutterIconNaviga
val name = psiClass.name ?: return
val targets = psiClass.mixinTargets
.mapNotNull { it.findSourceClass(psiClass.project, psiClass.resolveScope, canDecompile = true) }
if (targets.isNotEmpty()) {

val singleTarget = targets.singleOrNull()
if (singleTarget != null) {
if (singleTarget.canNavigate()) {
singleTarget.navigate(true)
}
} else if (targets.isNotEmpty()) {
getPsiElementPopup(targets.toTypedArray<PsiElement>(), "Choose target class of $name")
.show(RelativePoint(e))
}
Expand Down

0 comments on commit 117fc78

Please sign in to comment.