From aba632ec2c0ba14cfa3200619103836a0732dfeb Mon Sep 17 00:00:00 2001 From: RedNesto Date: Sun, 17 Dec 2023 18:20:51 +0100 Subject: [PATCH] Fix minecraft-dev/mcdev-error-report#1255 --- .../mixin/insight/MixinLineMarkerProvider.kt | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/main/kotlin/platform/mixin/insight/MixinLineMarkerProvider.kt b/src/main/kotlin/platform/mixin/insight/MixinLineMarkerProvider.kt index 60c4941a9..9e5b475c2 100644 --- a/src/main/kotlin/platform/mixin/insight/MixinLineMarkerProvider.kt +++ b/src/main/kotlin/platform/mixin/insight/MixinLineMarkerProvider.kt @@ -27,12 +27,12 @@ import com.demonwav.mcdev.platform.mixin.util.mixinTargets import com.intellij.codeInsight.daemon.GutterIconNavigationHandler import com.intellij.codeInsight.daemon.LineMarkerInfo import com.intellij.codeInsight.daemon.LineMarkerProviderDescriptor -import com.intellij.codeInsight.daemon.impl.PsiElementListNavigator -import com.intellij.ide.util.PsiClassListCellRenderer +import com.intellij.codeInsight.navigation.NavigationUtil import com.intellij.openapi.editor.markup.GutterIconRenderer import com.intellij.psi.PsiClass import com.intellij.psi.PsiElement import com.intellij.psi.PsiIdentifier +import com.intellij.ui.awt.RelativePoint import java.awt.event.MouseEvent class MixinLineMarkerProvider : LineMarkerProviderDescriptor(), GutterIconNavigationHandler { @@ -67,13 +67,8 @@ class MixinLineMarkerProvider : LineMarkerProviderDescriptor(), GutterIconNaviga val targets = psiClass.mixinTargets .mapNotNull { it.findSourceClass(psiClass.project, psiClass.resolveScope, canDecompile = true) } if (targets.isNotEmpty()) { - PsiElementListNavigator.openTargets( - e, - targets.toTypedArray(), - "Choose target class of $name", - null, - PsiClassListCellRenderer(), - ) + NavigationUtil.getPsiElementPopup(targets.toTypedArray(), "Choose target class of $name") + .show(RelativePoint(e)) } } }