From 13a3bd2cdcc07d7f368a8b91790bd05aa9b9faf6 Mon Sep 17 00:00:00 2001 From: Cecil Lin Date: Thu, 21 Apr 2022 07:52:58 +0800 Subject: [PATCH] fix: noarg-method navigation behavior --- CHANGELOG.md | 14 ++++++++------ gradle.properties | 2 +- .../kotlin/com/github/ceclin/bdlh/lang/ImplExt.kt | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6f083a..4295b70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,16 +3,18 @@ # BDLH Changelog ## [Unreleased] +### Fixed +- Method navigation behavior ## [0.2.0] -### Added -- Navigation for class signature +### Added +- Navigation for class signature -### Changed -- Update pluginIcon.svg +### Changed +- Update pluginIcon.svg -### Fixed -- Subclasses resolving +### Fixed +- Subclasses resolving - Method navigation behavior ## [0.1.0] diff --git a/gradle.properties b/gradle.properties index 2e7c070..f758ad1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ pluginGroup = com.github.ceclin.bdlh pluginName = BDLH # SemVer format -> https://semver.org -pluginVersion = 0.2.0 +pluginVersion = 0.2.1 # See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html # for insight into build numbers and IntelliJ Platform versions. diff --git a/src/main/kotlin/com/github/ceclin/bdlh/lang/ImplExt.kt b/src/main/kotlin/com/github/ceclin/bdlh/lang/ImplExt.kt index 36160f0..33849b3 100644 --- a/src/main/kotlin/com/github/ceclin/bdlh/lang/ImplExt.kt +++ b/src/main/kotlin/com/github/ceclin/bdlh/lang/ImplExt.kt @@ -18,7 +18,7 @@ class RefToJava(element: BDLSignature) : PsiReferenceBase(element, return clazz.findMethodsByName(method.methodName.text, false).firstOrNull { val parameter = method.parameter if (parameter == null) - it.hasParameters() + !it.hasParameters() else { it.parameterList.parameters.joinToString(",") { p -> val type = p.type