Minor: remove unused parameter in both buildNavigate to markers
This commit is contained in:
@@ -28,7 +28,6 @@ import org.jetbrains.kotlin.psi.KtDeclaration
|
||||
import org.jetbrains.kotlin.resolve.MultiTargetPlatform
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.module
|
||||
import org.jetbrains.kotlin.resolve.getMultiTargetPlatform
|
||||
import java.awt.event.MouseEvent
|
||||
|
||||
private fun ModuleDescriptor?.getMultiTargetPlatformName(): String? {
|
||||
if (this == null) return null
|
||||
@@ -74,7 +73,7 @@ fun KtDeclaration.navigateToActualTitle() = "Choose actual for $name"
|
||||
|
||||
fun KtDeclaration.navigateToActualUsagesTitle() = "Actuals for $name"
|
||||
|
||||
fun buildNavigateToActualDeclarationsPopup(e: MouseEvent?, element: PsiElement?): NavigationPopupDescriptor? {
|
||||
fun buildNavigateToActualDeclarationsPopup(element: PsiElement?): NavigationPopupDescriptor? {
|
||||
return element?.markerDeclaration?.let {
|
||||
val navigatableActualDeclarations = it.allNavigatableActualDeclarations()
|
||||
if (navigatableActualDeclarations.isEmpty()) return null
|
||||
|
||||
@@ -24,7 +24,6 @@ import org.jetbrains.kotlin.idea.core.toDescriptor
|
||||
import org.jetbrains.kotlin.idea.util.expectedDeclarationIfAny
|
||||
import org.jetbrains.kotlin.idea.util.hasDeclarationOf
|
||||
import org.jetbrains.kotlin.psi.KtDeclaration
|
||||
import java.awt.event.MouseEvent
|
||||
|
||||
fun getExpectedDeclarationTooltip(declaration: KtDeclaration): String? {
|
||||
val descriptor = declaration.toDescriptor() as? MemberDescriptor ?: return null
|
||||
@@ -43,7 +42,7 @@ fun KtDeclaration.navigateToExpectedTitle() = "Choose expected for $name"
|
||||
|
||||
fun KtDeclaration.navigateToExpectedUsagesTitle() = "Expected for $name"
|
||||
|
||||
fun buildNavigateToExpectedDeclarationsPopup(e: MouseEvent?, element: PsiElement?): NavigationPopupDescriptor? {
|
||||
fun buildNavigateToExpectedDeclarationsPopup(element: PsiElement?): NavigationPopupDescriptor? {
|
||||
return element?.markerDeclaration?.let {
|
||||
val navigatableExpectedDeclarations = it.allNavigatableExpectedDeclarations()
|
||||
if (navigatableExpectedDeclarations.isEmpty()) return null
|
||||
|
||||
@@ -206,7 +206,7 @@ private val PLATFORM_ACTUAL = object : MarkerType(
|
||||
{ element -> element?.markerDeclaration?.let { getPlatformActualTooltip(it) } },
|
||||
object : LineMarkerNavigator() {
|
||||
override fun browse(e: MouseEvent?, element: PsiElement?) {
|
||||
buildNavigateToActualDeclarationsPopup(e, element)?.showPopup(e)
|
||||
buildNavigateToActualDeclarationsPopup(element)?.showPopup(e)
|
||||
}
|
||||
}) {
|
||||
override fun getNavigationHandler(): GutterIconNavigationHandler<PsiElement> {
|
||||
@@ -217,7 +217,7 @@ private val PLATFORM_ACTUAL = object : MarkerType(
|
||||
}
|
||||
|
||||
override fun getTargetsPopupDescriptor(element: PsiElement?): NavigationPopupDescriptor? {
|
||||
return buildNavigateToActualDeclarationsPopup(null, element)
|
||||
return buildNavigateToActualDeclarationsPopup(element)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -228,7 +228,7 @@ private val EXPECTED_DECLARATION = object : MarkerType(
|
||||
{ element -> element?.markerDeclaration?.let { getExpectedDeclarationTooltip(it) } },
|
||||
object : LineMarkerNavigator() {
|
||||
override fun browse(e: MouseEvent?, element: PsiElement?) {
|
||||
buildNavigateToExpectedDeclarationsPopup(e, element)?.showPopup(e)
|
||||
buildNavigateToExpectedDeclarationsPopup(element)?.showPopup(e)
|
||||
}
|
||||
}) {
|
||||
override fun getNavigationHandler(): GutterIconNavigationHandler<PsiElement> {
|
||||
@@ -239,7 +239,7 @@ private val EXPECTED_DECLARATION = object : MarkerType(
|
||||
}
|
||||
|
||||
override fun getTargetsPopupDescriptor(element: PsiElement?): NavigationPopupDescriptor? {
|
||||
return buildNavigateToExpectedDeclarationsPopup(null, element)
|
||||
return buildNavigateToExpectedDeclarationsPopup(element)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user